

InterviewSolution
Saved Bookmarks
1. |
Solve : new user of c++? |
Answer» hi,iam new user of c++ so i want tips of how to tackle c++ problems.please give me tips.You are very vague. Listed below are some common programming errorsQuote from: taumang on February 18, 2011, 09:10:09 AM hi,iam new user of c++ so i want tips of how to tackle c++ problems.please give me tips.please post me a program and its algorithm so that i can understand what you are talking about.pretty basic stuff below, if you want to know more, ask what you want to know :p //double forward slash allows for comments #include //#include will include header files that will allow for functions that are within, iostream will be almost always used using namespace std; //this will use standard namespace which will let you type cout instead of std::cout int main(){ //this will define main function, function works within parenthesis int number = 0; //sets variable number to 0 and declares i as an int for (int i = 0; i < 3; i++){//loop 3 times number++;//increment number by 1; }//end loop cout << number << endl; //output variable number (3) followed by a line break return 0; //returns zero }//end mainGoogle: youtube C++ tutorial Here is 'Hello World' http://www.youtube.com/watch?v=vYHB0DUcfV0 |
|