where can i get a free c/c++ compiler that isnt dev-c++? it doesnt work for me...
Btw sorry if this tutorial is hard to understand its my first
Create a new console Application (win32 is the same as a console application)
If the following Code is not in your Starting code already then put it in
#include <stdlib.h>
#include <iostream.h>
#include <string>
using namespace std;
int main(int main(int argc, char *argv[]))
{
system("PAUSE");
return 0;
}
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>
#include <iostream.h>
#include <string>
using namespace std;
int main(int main(int argc, char *argv[]))
{
cout << "hello i am your computer talking" << endl;
system("PAUSE");
return 0;
}
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
hamm ... dont really get what this dose.. i only se a cout and it says im your cumputer talking nothing more really :S
All this for a simple "Hello Worl!" I don't think so...
You don't need all of that in there honestly, all you really need is a simple cout output message and then you can get it to say something. And you don't have to include those libraries just include the iostream.
Something easy like
That's as easy as it gets.. but I don't know why you did all of that extra stuff just to make it say something you don't really need to put all of that, lol.Code:#include <iostream> using namespace std; int main() { cout << "Hello World"; return 0; }
And that's using C++.. :/
Course if you want to start in C you can, but I think C++ is somewhat easier, don't ask me why I thikn this but seriously, not everyone is right about starting with C.
Last edited by Joanne; 03-31-2006 at 09:30 AM.
lolz good stuffOriginally Posted by SpiderByte
I replaced "hi, I'm your computer talking." with "hi, I am your ass-slave"
Fun is what programming is all about right?Originally Posted by EkstatikX
Ok.....so I can use c++ to map out a prog like the Headshot single kill for warrock?
[CENTER]
The Grin is in.
[IMG]https://i33.photobucke*****m/albums/d74/sadisticgrin/The-grincopy.png[/IMG]
I AM the Influence.
#include <stdlib.h>
#include <iostream.h>
#include <string>
using namespace std;
int main(int main(int argc, char *argv[]))
{
cout << "hello i am your computer talking" << endl;
system("PAUSE");
return 0;
}
thats C/not C++ (this is C++ Section)
C#/C++ would be more like
#include <iostream>
using namespace std;
int main()
{
cout<<"Eny text";
cin.get(); //if you want