| | |
TurboC3 not compiling basic programs help....
Thread Solved |
•
•
Join Date: Jul 2009
Posts: 2
Reputation:
Solved Threads: 0
Hello...
Im a newb to both C programming and DaniWeb ..
the prob is tht i try to compile this program in TurboC3
#include <stdio.h>
#include<Conio.h>
main()
{
printf( "hello" );
getch();
}
when i press " alt+F9 " it says " Warning:: program should return a value" and no errors
When i press " Alt + F5 " I see nothing but a black screen and cursor on it (like in logo) when i have to get Hello....
wht can be the problem...
anything wrong in the program?
plz help me...
regards
yesh
Im a newb to both C programming and DaniWeb ..
the prob is tht i try to compile this program in TurboC3
#include <stdio.h>
#include<Conio.h>
main()
{
printf( "hello" );
getch();
}
when i press " alt+F9 " it says " Warning:: program should return a value" and no errors
When i press " Alt + F5 " I see nothing but a black screen and cursor on it (like in logo) when i have to get Hello....
wht can be the problem...
anything wrong in the program?
plz help me...
regards
yesh
•
•
Join Date: Aug 2008
Posts: 92
Reputation:
Solved Threads: 2
If you write your program like this:
It should work..
C Syntax (Toggle Plain Text)
#include <stdio.h> #include <conio.h> void main(){ printf("\nHello World !!"); getch(); }
It should work..
Last edited by deepugtm; Aug 1st, 2009 at 7:25 am.
•
•
•
•
I am too new to c programming.I think as the program doesnt return any value you should either put void main,
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
•
•
Join Date: Mar 2009
Posts: 36
Reputation:
Solved Threads: 7
•
•
•
•
Hello...
Im a newb to both C programming and DaniWeb ..
the prob is tht i try to compile this program in TurboC3
#include <stdio.h>
#include<Conio.h>
main()
{
printf( "hello" );
getch();
}
when i press " alt+F9 " it says " Warning:: program should return a value" and no errors
When i press " Alt + F5 " I see nothing but a black screen and cursor on it (like in logo) when i have to get Hello....
wht can be the problem...
anything wrong in the program?
plz help me...
regards
yesh
2. main should return int and nothing else
3. C is case sensitive, so Conio.h is wrong.
4. If I'm not wrong, ALT+F5 is used to hold the screen if you're not using getch().
5. Use code-tags to post your code.
Last edited by 9868; Aug 2nd, 2009 at 3:25 am.
@OP
I apologise if this remark seems a little out of place with respect to your query, but I would suggest that you look at using an up-to-date setup. Turbo C is pretty dated.
Personally, for the Windows platform, I would recommend the MinGW toolchain in conjunction with your favourite editor or IDE. Codeblocks is a good IDE option and you can download it with MinGW as part of the package.
I use MinGW in conjunction with the CDT tooling in Eclipse. It works well - except that there are still some integration issues with the gdb debugger - but it's not a "show-stopper".
I apologise if this remark seems a little out of place with respect to your query, but I would suggest that you look at using an up-to-date setup. Turbo C is pretty dated.
Personally, for the Windows platform, I would recommend the MinGW toolchain in conjunction with your favourite editor or IDE. Codeblocks is a good IDE option and you can download it with MinGW as part of the package.
I use MinGW in conjunction with the CDT tooling in Eclipse. It works well - except that there are still some integration issues with the gdb debugger - but it's not a "show-stopper".
Last edited by yellowSnow; Aug 2nd, 2009 at 6:32 am.
Manic twiddler of bits
I should have posted this in my previous blurb. Here's a link to a sticky post at the head of the C forums page:
http://www.daniweb.com/forums/thread50370.html
http://www.daniweb.com/forums/thread50370.html
Manic twiddler of bits
![]() |
Similar Threads
- QBASIC under Windows XP (Visual Basic 4 / 5 / 6)
- GW Basic running on WIndows 2000/XP (Legacy and Other Languages)
- Visual Basic 6 Sub programs? (Visual Basic 4 / 5 / 6)
- Installing Basic Programs (*nix Software)
- Want to learn LINUX..some help required (Getting Started and Choosing a Distro)
- How do I execute executable programs in visual basic using.... (Visual Basic 4 / 5 / 6)
- Surpassing GW-BASIC memory limit. (Legacy and Other Languages)
- Doubt about compiling. (Legacy and Other Languages)
- Data Abstraction (Computer Science)
Other Threads in the C Forum
- Previous Thread: dice probability
- Next Thread: Pointers and Sorting Array by Even and Odd numbers
| Thread Tools | Search this Thread |
#include adobe ansi api array asterisks binarysearch changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic execv feet fgets file fork forloop frequency function getlasterror givemetehcodez global grade graphics gtkgcurlcompiling hacking hardware highest histogram i/o include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue mysql number odf opensource owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing scanf segmentationfault sequential shape socket socketprograming standard string systemcall threads turboc unix user voidmain() wab windows.h windowsapi






