Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Problem with VS compiler or my code?

Author
Message
aarrowh
17
Years of Service
User Offline
Joined: 19th Oct 2007
Location:
Posted: 10th Mar 2009 19:21
I'm starting to learn C++ and I found a basic tutorial, of course it started with a 'hello world' program. So I typed it in, but when I tried to compile, all I got was an error...any help?

code..






Image thanks goes to AndrewT
Mulderman
20
Years of Service
User Offline
Joined: 8th Jan 2004
Location: C:\\
Posted: 10th Mar 2009 19:36
just add semicolon at the end of


At it will work.
Mulderman
20
Years of Service
User Offline
Joined: 8th Jan 2004
Location: C:\\
Posted: 10th Mar 2009 19:37
so it becomes:
cout << "I'm learning to code in C++";
aarrowh
17
Years of Service
User Offline
Joined: 19th Oct 2007
Location:
Posted: 10th Mar 2009 20:02
thanks! forgot that. Now I also do some coding in DBP, what is the C++ equivalent of a DO LOOP loop set, so that the program does not close as soon as it opens...



Image thanks goes to AndrewT
Mulderman
20
Years of Service
User Offline
Joined: 8th Jan 2004
Location: C:\\
Posted: 10th Mar 2009 20:06
Add this line to below of your #include's



and this line just before (at top) of the: return 0;

Mulderman
20
Years of Service
User Offline
Joined: 8th Jan 2004
Location: C:\\
Posted: 10th Mar 2009 20:10
This is for console app.
If you are using the DarkGDK then you should read tutorials about it.




Since im not using DarkGDK, so i can't test it but it should work.
Its from http://gdk.thegamecreators.com/

scroll down
aarrowh
17
Years of Service
User Offline
Joined: 19th Oct 2007
Location:
Posted: 10th Mar 2009 20:31 Edited at: 10th Mar 2009 20:33
thanks! I have DGDK, but I don't know to much about C++ so I didn't think any type of game was what I should be working on right now.

*edit*
it still isn't staying open, and its telling me that their were build errors...

code...




Image thanks goes to AndrewT
Mulderman
20
Years of Service
User Offline
Joined: 8th Jan 2004
Location: C:\\
Posted: 10th Mar 2009 20:53
Always check semicolons.
Semicolon must be after every line. Ok almost.
See through the code and add them if some of them is missing.
aarrowh
17
Years of Service
User Offline
Joined: 19th Oct 2007
Location:
Posted: 10th Mar 2009 21:00
Got it. Thanks a ton, you've been a great help!



Image thanks goes to AndrewT
Mulderman
20
Years of Service
User Offline
Joined: 8th Jan 2004
Location: C:\\
Posted: 10th Mar 2009 22:30
If you have any other questions then post them here,
i will try to help you.

Login to post a reply

Server time is: 2024-11-25 17:28:37
Your offset time is: 2024-11-25 17:28:37