www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



c++ - problem

↑ ↓ ← Cody <cody_user mailinator.com> writes:
I created the file hello.cpp, I ran it WITH the stlports thing,
and then the confirm message i got was:
link hello,,,user32+kernel32/noi;
so I assumed that meant that it compiled properly since I didnt
get any FATAL ERRORS. So then I ran hello.exe and all that
happened was that the command prompt flashed. like when you
execute a program that doesnt do anything. my code was:


#include <iostream>

int main
{
cout << "hello world/n";
}



Was there something wrong with the code or did it not compile
right or what? from what I know about C++(which is very little
since I just started today) there should be nothing wrong.
Jun 30 2007
↑ ↓ Cody <cody_user mailinator.com> writes:
never mind, I should have known, sorry for the inconvenience, but
for all future users, you have to run it from the command prompt.
I should have remembered this
Jun 30 2007
↑ ↓ → Bertel Brander <bertel post4.tele.dk> writes:
Cody skrev:
 never mind, I should have known, sorry for the inconvenience, but
 for all future users, you have to run it from the command prompt.
 I should have remembered this

You could also add: cin.get(); at the end (just before }), to make et wait for you to hit <Enter> Notice it is \n not /n -- Just another homepage: http://damb.dk But it's mine - Bertel
Jun 30 2007