![]() |
| ||
| help :S hey there , Im taking C++ courses in my collage (so ım a newbie) and they are teaching programing language a bit different from the examples in this forum. #include <stdio.h>well this works too, but ı can not understand most of the programs in this forum is there any place to learn how to write that " cout << ".... ; " thing or something like this :S ty for helping this newcommer:) /* sorry for my bad english ı hope u could understand what ı meant */ |
| ||
| Re: help :S That is C code, not C++. Are you sure you are in a c++ class? for a fstream tutorial click here. cout is quite easy to learn. First you have to include <iostream> header file -- it does not have a .h extension. Then declare the std namespace. #include <iostream> |
| ||
| Re: help :S If you want to use cout and cin you'll have to include <iostream> and use namespace std. A sample program is something like this: #include <iostream> It's really not that hard, a good site would be: http://www.java2s.com/Tutorial/Cpp/0...0040__cout.htm By the way, why give void as an argument to main? Hope this helps, if you have any questions just post them ^^ EDIT: bah, Ancient Dragon beat me to it |
| ||
| Re: help :S ty for your replies. Quote:
Quote:
ty again |
| ||
| Re: help :S void main(). C and C++ standards require main() to return an int. |
| All times are GMT -4. The time now is 11:40 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC