what is the first step in c++?

Started by
4 comments, last by littlewater 19 years, 11 months ago
i installed bcb on my computer during my first term i learn some basic about c++, sb. told me that you should programme frequently so i won''t forget it and i could develop c language. but programme ,for me ,is sth which can''t see and can''t touch, i only know about if for while ... and so on. but i know that nobody will born with high technology of c++. what''s your first step of c++? À´×ÔÖйúµÄÇóѧÕß¡­¡­
À´×ÔÖйúµÄÇóѧÕß¡­¡­
Advertisement
First step: Get a good book (or digital information)
Second step: begin with simple dos programs. just write som text on screen.
Third step: Write to file
Fouth step: use classes
Fived step: Go to windows programs.

This is how I learned it at school. In a few weeks I hade a nice pong game in de dos prompt. a year later I had the same in windows but than object orriented.
so Third step: Write to file...

how can i write to a file like book.txt??

i just could read from file using ifstream from a file "oil.in"......

À´×ÔÖйúµÄÇóѧÕß¡­¡­
À´×ÔÖйúµÄÇóѧÕß¡­¡­
You read a file with an std::ifstream, so you''d write with an std::ofstream.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
This could be done by ofstream. the exact statement you could find in the help file or on internet.
the same format?

ok~thx!~
_______________________________________________

but i don''t know whether i can keep up with others

for in the palace of " for beginners " i also can''t

understand most of other''s talking , i''ll do my best

but /...
À´×ÔÖйúµÄÇóѧÕß¡­¡­

This topic is closed to new replies.

Advertisement