arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Explaining your first program! [C++]
#8
hello
first of all, that is int main() or int main(int argc, char** argv) or int main(int argc, char* argv[])
void main() give's error boath in C and C++
but if you do not type return 0; you will get just a warning
second, you must do
#include <iostream>
instead of including iostream.h
now, this is the hello world application which every programmer write's
#include <iostream>
using namespace std;
int main()
{
cout << "hello world!\n";
return 0;
}
now, you can omit using namespace std;
but instead of that you must write std:: cout <<"hello world\n";
note: \n is a new line
and, every text must be inside quotations
thanks
lockThread Closed 


Messages In This Thread
Explaining your first program! [C++] - by paronte - 10-01-2015, 04:09 AM
RE: Explaining your first program! [C++] - by brightening-eyes - 01-15-2016, 11:37 AM

Possibly Related Threads…
Thread
Author
Replies
Views
Last Post

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting