Add new comment
[Tut.] C++ : Making your first console window |
||
Submitted by Akimoko on Sun, 2006-06-04 08:29 | ||
Ok it seems alot of people are interested in taking up c++ to make dlls for ds2 , here is a small tut. to get you started with c++ to get Dev C++ compiler : http://www.bloodshed.net/download.html Open Up whichever Compiler you will be using (i use ms visual c++). If the following Code is not in your Starting code already then put it in #include <stdlib.h> int main(int main(int argc, char *argv[])) { Ok now go to the first Bracket and hit enter twice to start a line under the bracket. then Type the following cout << "hello i am your computer talking" << endl; Now your code should look like this #include <stdlib.h> int main(int main(int argc, char *argv[])) { cout << "hello i am your computer talking" << endl; system("PAUSE"); } Now all you have to do is Build and compile then run it and a dos window should appear saying "Hello , I am your computer talking" Summary : the command 'cout' tells the computer that you want to output some data through the console. The 2 less than sign following the cout tell the computer that the thing that follows will be shown on the console. The double quotes are to tell the computer where the string will start and end. And Endl; means that you want to start a new line. Hope this helped Some of you soon-to-be programmers on your way of learning, I will Be making a tutorial soon on how to make the console add,substract,multiply or divide numbers. -Dan forums: |
||
» |