• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# plz bear with me...

## Recommended Posts

allright i joined the community because i was referred here and i have a great interest in making games...now i''ve been using rpgmaker 2000 so its time to grow up and learn the language....ok....i read the tutorials and somone suggested downloading dev c++ the program to get a feel for programming....i downloaded and installed but now what....i know its for making apps...but is there specifics?im sorry if this irritates the programming literate people...

##### Share on other sites
Okay, in order to use the compiler, you need to learn the language it compiles. Ergo, you need to learn C++ if you''re serious about being a game programmer.

Open up Dev-C++, start a new Console Application, do all the introductory stuff (name/save your workspace (.dev)), then type the following in the "Untitled" file that comes up:
#include <iostream>using namespace std;int main(){    cout << "Hello, world!" << endl;    return 0;}

Compile it using the menu option (you might have to name the file something...just call it main.cpp or similar). If all goes well, it should say something like
Errors: 0
Compiled file size: 45KB (<-- NOTE: totally random number, it''ll probably be higher)

Then, Run it using the menu and you''ll see
Hello, world!
on the screen.

Something I neglected to tell you. If it compiles and seems to disappear really quickly when you run it, just post again here, but I suspect you''ll have more questions about getting everything working before you get to that point, so just try that and post with any issues you might have.

Stick with it.

Peace,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//

##### Share on other sites
allright i typed it in just like this:
#include <iostream>
using namespace std;
int main()
(
cout << "Hello, world!" << end1;
return 0;
}
then i compiled then this happenned
5 C:\Dev-Cpp\main.cpp
end1'' was not declared in this scope

5 C:\Dev-Cpp\main.cpp
parse error before ;''

C:\Dev-Cpp\Makefile.win
[Build Error] [main.o] Error 1

these were in the compile error window...now what?
oh,also since you are being helpful i was wondering if you knew any other sites like this one that can help me out...and that are good game developer sites...thanx!

##### Share on other sites
on the line after int main()
you have a ( instead of {

##### Share on other sites
Is that a 1 or a L?
Check your line "cout << "Hello, world!" << endl;
"
You have replaced ENDL WITH END1... switch it to L...

##### Share on other sites
allright!i compiled and it went through...but when i pressed run...it seemed as if the window went up and dissappeared in a blink of an eye....what happenned?

##### Share on other sites
Look articwolf3805, although it''s possible to learn C++ by random trial and error, it''s a *very* ineffective method of learning. Take a look at the "For Beginners" link above for a good list of beginner C++ books. Good luck!

##### Share on other sites
i''ve already been there...the guy was just showing me something and i wanted to make sure i was getting it right

##### Share on other sites
The anonymous poster above is making a good point... You really should get a good book, as I already have mine. Plus there are plenty of great tutorials for c++ programming(and I mean game programming) all over the internet.

By the way... this is the beginner-forum if I''m correct.
I think it would be nice to forgive us newbies our stupidity sometimes...

So, if you want the program to hold the text on screen waiting for a key-press to quit, just #include and before return 0 put getch();... this function waits for key-press.

##### Share on other sites
sorry... #include conio.h with these''<>'' around it.

##### Share on other sites
i found out why it was going up and dissappearing so quickly!i didn''t put this line of code in

system("PAUSE");

i got it now

##### Share on other sites
Geez people, I was giving him example code to show ''im how to get things done in the IDE; in other words, answering his question.

Now that he has that figured out, yeah, it''s fine to suggest that getting a book is the best way to learn (IMHO, it IS the best way), but keep it casual.

As stated, the stdlib+system fix is one way to go about making a pause. For sake of discussion, it might merit a little explanation. The system(...) function takes a const char pointer which contains a command which is then interpreted by the command interpreter (that is, MS-DOS or CMD.EXE on more recent systems), and executed. As most people know, PAUSE is the command used often in batch files to delay execution while the operator reads output. Using it gives me a fuzzy rush of nostalgia Anyway, enough rambling.

Peace,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//

##### Share on other sites
thankyou zealous....and about books...i get them on friday!!cant wait...also i joined a online group for begginners...that starts tommorrow night

• ### Forum Statistics

• Total Topics
627746
• Total Posts
2978906

• 10
• 10
• 21
• 14
• 14