Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1] 2   Go Down

Author Topic: Need Help with C++  (Read 3995 times)

0 Members and 1 Guest are viewing this topic.
Need Help with C++
« on: April 17, 2007, 09:07:26 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 598
Alright, I'm trying to learn C++ currently; but my compiler, Dev-C++ doesnt seem to wanna run any program I compile. So, how do i know if my program works if it wont compile?!
Logged
[...The mystery of wireless, revealed...]

[...Ninjas...]
Re: Need Help with C++
« Reply #1 on: April 17, 2007, 09:54:13 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
You've probably screwed up the compiler installation - I did the same thing the first time I used Dev-C++. What you have to realise is Dev-C++ is just an IDE the actually compiler is MinGW so make sure you have MinGW fully installed and setup correctly.
Logged
Re: Need Help with C++
« Reply #2 on: April 17, 2007, 10:25:08 pm »
  • Wu tang Forever
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 668
Alright, I'm trying to learn C++ currently; but my compiler, Dev-C++ doesnt seem to wanna run any program I compile. So, how do i know if my program works if it wont compile?!
It could be that nothing is stopping it from closing
like if your code is
int main(whatever)
{
  cout<< "sometihng \n";
}

and you choose to compile and run in Dev, the program will just run and close.
Not sure if that's your problem but its possible
Logged
Re: Need Help with C++
« Reply #3 on: April 17, 2007, 10:32:06 pm »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
Alright, I'm trying to learn C++ currently; but my compiler, Dev-C++ doesnt seem to wanna run any program I compile. So, how do i know if my program works if it wont compile?!
It could be that nothing is stopping it from closing
like if your code is
int main(whatever)
{
  cout<< "sometihng \n";
}

and you choose to compile and run in Dev, the program will just run and close.
Not sure if that's your problem but its possible

I think this is more of a compiler issue.  If it was the code, then the console would appear for less than a second before closing.
Logged



i love big weenies and i cannot lie
Re: Need Help with C++
« Reply #4 on: April 17, 2007, 11:15:51 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 598
i downloaded the full compiler as infinitus said, and it still wont work. the console window doesnt even show up. D:
Logged
[...The mystery of wireless, revealed...]

[...Ninjas...]
Re: Need Help with C++
« Reply #5 on: April 17, 2007, 11:19:11 pm »
  • If not now, when?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 520
http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en (Valid Windows copy required)

Completely free, and better than DevC++.. at least, I think so ;-). MingW is also pretty slow... There is a guide on the microsoft website for using the platform SDK with Visual C++ 2005.. The platform SDK gives you the files you need to build Win32 applications... The regular download MIGHT already have the stdlib (for using cout), but I'm not sure.
Logged
Re: Need Help with C++
« Reply #6 on: April 18, 2007, 02:01:08 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 598
well thanks acid; that should do the trick, and it linked to a bunch more things i can learn to program in. :)
Logged
[...The mystery of wireless, revealed...]

[...Ninjas...]
Re: Need Help with C++
« Reply #7 on: April 18, 2007, 08:28:48 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
i downloaded the full compiler as infinitus said, and it still wont work. the console window doesnt even show up. D:
Did you set up the environment variables correctly?
Logged
Re: Need Help with C++
« Reply #8 on: April 18, 2007, 08:56:02 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 598
What do you mean? >_> I hit new project, console, and did a hello world >:O. it wouldnt work. neither on Dev-C++ or VC++. im thinking i might just start off with VB >_>
Logged
[...The mystery of wireless, revealed...]

[...Ninjas...]
Re: Need Help with C++
« Reply #9 on: April 18, 2007, 10:04:31 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
MinGW needs environment variables set to work, just google 'MinGW environment variables'.
Logged
Re: Need Help with C++
« Reply #10 on: April 18, 2007, 01:13:46 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 647
Before return 0.
Code: [Select]
system("PAUSE");
Logged
Re: Need Help with C++
« Reply #11 on: April 18, 2007, 03:57:41 pm »
  • Minalien
  • *
  • Reputation: +10/-1
  • Offline Offline
  • Gender: Female
  • Posts: 2119
Servu, go to the project's directory, go to /bin/Debug/ and see if there's an executable file there. If so, run it and see what happens (not the vshost)
Logged
Quote
There's such a double standard about religion in the modern world. Catholics can gather, wear white robes, and say "In nomine Patris, et Filii, et Spiritus Sancti" and be considered normal.

But if my friends and I gather, wear black robes, and say  "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn", we're considered cultists.
  • Development Blog
Re: Need Help with C++
« Reply #12 on: April 18, 2007, 04:05:53 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Servu, go to the project's directory, go to /bin/Debug/ and see if there's an executable file there. If so, run it and see what happens (not the vshost)
He's using Dev-C++ not VS.
Logged
Re: Need Help with C++
« Reply #13 on: April 18, 2007, 04:15:58 pm »
  • Minalien
  • *
  • Reputation: +10/-1
  • Offline Offline
  • Gender: Female
  • Posts: 2119
What do you mean? >_> I hit new project, console, and did a hello world >:O. it wouldnt work. neither on Dev-C++ or VC++. im thinking i might just start off with VB >_>

I was talking about with VC++, find out if it's a problem on the compiler side, computer side, or if it's something similar to what Soulrivers said, because that's happened every now and then with me, where the console comes up and leaves so fast you dont see it at all
Logged
Quote
There's such a double standard about religion in the modern world. Catholics can gather, wear white robes, and say "In nomine Patris, et Filii, et Spiritus Sancti" and be considered normal.

But if my friends and I gather, wear black robes, and say  "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn", we're considered cultists.
  • Development Blog

aab

^ Evolved from a Hobbit
Re: Need Help with C++
« Reply #14 on: April 18, 2007, 04:17:06 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 992
..All i did when i first started was installed the DevC++ download that comes complete with MingW, and sets it up for you...Or it did back then at least.
.Though these days i use Code::Blocks with MingW
Logged




I ♥ Sol
.... I ♥ Sol ? wtf how long has that been there? >_> *rrrrrrrrar*
  • MySpace
Re: Need Help with C++
« Reply #15 on: April 18, 2007, 04:31:18 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Quote
I was talking about with VC++
VC++ != Dev-C++.
Logged
Re: Need Help with C++
« Reply #16 on: April 18, 2007, 04:43:06 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
you might also want to try out eclipse, though i found that much harder than setting up vc++ or dev-cpp ;p
Logged

aab

^ Evolved from a Hobbit
Re: Need Help with C++
« Reply #17 on: April 18, 2007, 05:23:28 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 992
Quote
I was talking about with VC++
VC++ != Dev-C++.
AcidGame posted VC++; He downloaded and tried it and it didn't work either.
Theres probably some sort of mix up here though; why not there always is.
Logged




I ♥ Sol
.... I ♥ Sol ? wtf how long has that been there? >_> *rrrrrrrrar*
  • MySpace
Re: Need Help with C++
« Reply #18 on: April 18, 2007, 05:24:39 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Quote
I was talking about with VC++
VC++ != Dev-C++.
AcidGame posted VC++; He downloaded and tried it and it didn't work either.
Theres probably some sort of mix up here though; why not there always is.
Yep, I'm mixed up as always.
Logged
Re: Need Help with C++
« Reply #19 on: April 18, 2007, 07:21:13 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 598
i tried all that; still nothing. i thought maybe it was the code but i got the source for boxedirc from vash and that wouldnt even compile. yet VB compiles fine. !@#$% the whats going on here?!
Logged
[...The mystery of wireless, revealed...]

[...Ninjas...]
Pages: [1] 2   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.913 seconds with 74 queries.

anything