My 1st programme?

after some trying and testing and scratching my head i managed to come up with this .....
1
2
3
4
5
6
7
8
9
10
11
// my test project				

#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
	Console::WriteLine("after some trying and testing i finally managed to wire something in the end and have it succeed");
	return 0;
}


although i spelt the word "write" as "wire" it still succeeded when i clicked "build"
What problem are you having? Btw, what namespace is System? I've never heard o lf it, though it looks a bit like c++.net
Yes, it looks like .NET. You should post this in the Windows Programming.
It isn't "Plain" C++.
tbh i dont know what namespace system is, it was in a template. i just remembered what to type and kept repeating it lol. i only took an interest in C++ today .i made an earlyer post asking if anyone could give live lessons, i was asked to try leanring a basic " hello world" programme".
System is the main Windows .NET Framework, i guess.
You are using Microsoft's Visual Studio, aren't You?
This isn't a really "useful" Hello World program.
Look around for C++ tutorials about "iostream" or "cstdio" (stdio.h is the old cstdio, wherever you see "#include <stdio.h>" you can replace it with cstdio)
1
2
3
4
5
6
#include <iostream>

int main(){
std::cout << "Hello world!";
return 0; 
} 
that is a simple hello world program.
yea, iv got m-soft visual C++ 2010 express. i just want to learn C++ to eventually be able to write my own programmes to prevent hack attacks on my comp. could you link me to an "iostream" tutorial?
follow this website's tutorial.
i have the pdf about C++ from this site and i have read through it upto page 14, i get some of it but not all of it. i learn better with someone that can actually tell me what something means instead of an example and common explanation. if anyone could give me a live lesson i would gladly take it.
Last edited on
if you do not get it. try it. look up videos...
There are many beginner tutorials and videos around. Use google and youtube.
I personally think C++.NET is a joke. .NET is good in c# and VB, but shouldn't try to impose itself on C++. The tutorials on this site are a nice place to start
Topic archived. No new replies allowed.