| Author |
Message |
hassenman
Joined: 29 Nov 2004 Posts: 122 Helped: 2
|
29 Dec 2004 15:07 preoblem with turbo c++ |
|
|
|
i'm new to c++
and i'm using tc++ 4.5
i wanna know if its possible c++ to run a program without having the exe file created
i mean like in turbo pascal (u run the program first then u compile and make)
if its possile tell me what compiler to use or how should i use mine .
because now when i click on the run button i get some errors the mouse pointer turns to a stop .
i need ur help thx
|
|
| Back to top |
|
 |
Regnum
Joined: 17 Jun 2004 Posts: 264 Helped: 12 Location: Hurlingham
|
29 Dec 2004 16:04 Re: preoblem with turbo c++ |
|
|
|
both Turbo Pascal and C++ do compile before run, even when you don't realize this process, so, what's the reason to avoid compile ?
Regards
|
|
| Back to top |
|
 |
hassenman
Joined: 29 Nov 2004 Posts: 122 Helped: 2
|
29 Dec 2004 19:16 Re: preoblem with turbo c++ |
|
|
|
i know they do compile before running.
now my problem is that i'm not getting any program running even the simplest.
i just tried to compile the hello world "program" but it doesn't
i don't know whats the problem .
#include <iostream.h>
int main(void)
{
cout << "Hello." << endl;
return 0 ;
}
hope u can help me guys . i'm newbie (an idiot one)
|
|
| Back to top |
|
 |
seinfield
Joined: 12 Dec 2001 Posts: 41 Location: Mexico
|
30 Dec 2004 0:14 preoblem with turbo c++ |
|
|
|
hi, try this, it works for me, i used Dev C++:
#include <iostream.h>
#include <stdlib.h>
int main(){
int a;
for (a = 0 ; a <= 20 ; a++)
{
cout << a;
if (a % 3 == 0) cout <<" Es multiplo de 3";
else cout << " No es multiplo de 3";
cout << endl;
}
system ("Pause");
return 0;
}
|
|
| Back to top |
|
 |
aamiralikhoja
Joined: 11 Aug 2004 Posts: 88
|
30 Dec 2004 13:36 Re: preoblem with turbo c++ |
|
|
|
dear
it is confusing wether ur programm is error free or not try put getch() ;(#include<conoi.h> at the start) before return statement and run.
|
|
| Back to top |
|
 |
artem
Joined: 22 May 2003 Posts: 1640 Helped: 90 Location: Turan
|
30 Dec 2004 15:11 preoblem with turbo c++ |
|
|
|
| Try to link library statically to executable (if it is applicable for turbo C) and then run . It could be case than c++ run time libraies are not linked to the compiled executable and when you run program on windows , system can not find path where these libraries are located .
|
|
| Back to top |
|
 |
cyb72
Joined: 30 Dec 2004 Posts: 4
|
30 Dec 2004 17:33 preoblem with turbo c++ |
|
|
|
Suggest you to install Borland C++ 5.02
Also support DOS program.
Run BC++
(create a project first)
File -> New -> Project Platform set to DOS and input the project name, and click ok
double click the xxxxx.cpp and input the code.
#include <iostream.h>
int main(void)
{
cout << "Hello." << endl;
return 0 ;
}
and then click RUN!
It's ok.
|
|
| Back to top |
|
 |
swgchlry
Joined: 08 Dec 2003 Posts: 72 Helped: 1
|
03 Jan 2005 3:27 preoblem with turbo c++ |
|
|
|
| the compile will occur befor the run
|
|
| Back to top |
|
 |
boeysue
Joined: 23 Dec 2004 Posts: 190 Helped: 3
|
03 Jan 2005 23:02 Re: preoblem with turbo c++ |
|
|
|
| maybe you can type the error message in the output windiws,then others can help you in more detail
|
|
| Back to top |
|
 |