c++ doubt ...plz help

Status
Not open for further replies.

iinfi

mekalodu
i v installed .NET
i.e. microsoft development environment 2002 and it has microsoft .net framework 1.0

i wud like to know how i can compile n run C++ programs in this environment....

programs which i write run well n VC++ 6 but do not compile in .net environment..........

this is the simple program i tried...
#include<iostream.h>
#include<conio.h>

void main()
{
cout<<"Hello";
}

why is this so??

when i start .net environment i select file -> new -> project -> visual C++ projects -> ..... and it gives me a number of templates....

which template should i select ...
 

sms_solver

In the zone
yr program won't work

v c++ .net is different 'cos it used .net framework

find there may be code migration wizard!
 
OP
iinfi

iinfi

mekalodu
in that case ....

well in that case is the old c++ which i v learnt ... like the small program which i v posted b4 obsolete???

Howz VC++ different from the original C++??
the old code works fine in VC++ 6 .... but not in .NET !!

is the good old C++ gonna b out in a few years??

i type the same code in linux environment n it works ...

cud u plz explain whats its all abt.??
 
OP
iinfi

iinfi

mekalodu
VC++.NET ....

i picked up a book on VC++.NET from a friend n it says VC++.NET is completely different from the original C++ ....

now i fail to understand why r their different verions of the mother of all programming languages?

why is the mother changing all the time ???

:roll:
 
OP
iinfi

iinfi

mekalodu
the std C++ code doesnt compile in VC++.NET

even after trying the "window" and the "console" application std C++ code doesnt compile in VC++.NET


another question ...

What is the difference between Win32 API, MFC,
ATLand .NET as far as C++ is concern??

where does the code written in my first post fit in?
 

sudhir_mangla

Broken In
go to new project Visual c++ projects .

choose win32 console project

try the following code

Code:
#include "stdafx.h"
//#include<conio.h> 
//#include<iostream> 

using namespace std ;
void main() 
{ 
	cout<<"Hello"; 
}

remember to include #include "stdafx.h"

<iostream> is included in "stdafx.h" by default
and according to new c++ standards files are included as #include<iostream> not #include<iostream.h>

for cout<< to work you don't need to include conio.h

you need this statement

using namespace std ;

in facts vc++ 6.0 don't supports c++ standard but vc++.net does.

vc++.net provide batter support to c++ then ever before
 
Status
Not open for further replies.
Top Bottom