| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
Using C++ .net for C programming
|
Original Message
|
Name: Scott Swedo
Date: October 7, 2003 at 19:44:31 Pacific
Subject: Using C++ .net for C programming OS: WinXP Home CPU/Ram: P3 900, 640MB
|
Comment: I'm taking C Programming in college this semester. I'm using the C++ .net compiler to create my programs, since Microsoft discontinued the sale of C++ v6.0 (which we're using in school) My problem is this: For our program assignments, we're to create a program, turn in souce code, pseudo, etc. My professor said that when she checks the programs, she does so in straight MS-DOS (she says it's easier). But when I try to run my application from a command line only option on my Win98 box, it says this program can't be run in DOS mode (my source only uses the includes <stdio.h> and <conio.h>), . So i take it to school, and compile the code on C++ v6.0 run it from a win98 command line only option. Same thing happens. My code is FLAWLESS - no errors or anything (that's not relying on ms debug - that's my fine-tooth combover). Any ideas??? Sorry bout the long post, but this is my last resort (MS no help, btw)
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: egkenny
Date: October 7, 2003 at 20:36:30 Pacific
|
Reply: (edit)What kind of project did you create? You need to create a "Win32 Console Application" to run it in DOS mode. To check this bring up the project settings and select the C++ tab. For the "Preprocessor definitions" you should see something like: WIN32,NDEBUG,_CONSOLE If you can try to get a copy of Visual C++ 6.0 and use that. You just need to find a friend to burn a copy for you. Make sure you get the CD key also. You did say that your bought a copy of Visual C++ .NET so this is prefectly legal to do so. According to our distributor all Microsoft requires you to to is buy a license for the current version. In other words If I buy a license for Visual C++ .NET Pro I am free to use it or a lesser version such as Visual C++ 6.0 Pro.
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: borelli35
Date: October 8, 2003 at 00:52:57 Pacific
|
Reply: (edit) ================================================== I'm not sure what your prof is talking about but there is no mixing the two types of code. Win32 is windows, DOS is DOS. There is no middle ground. Maybe she was testing your understanding of the generated code or she could be talking about using the windows compilers command line utilities. She can NOT be talking about using a DOS compiler though. It's apples and oranges.borelli35
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: anonproxy
Date: October 8, 2003 at 20:02:08 Pacific
|
Reply: (edit)Your last resort is to email the teacher and ask what she is talking about. Either she doesn't compile the code (i.e. make her job easy) or she does so in 2000/XP.
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: Fozzie
Date: October 8, 2003 at 20:04:59 Pacific
|
Reply: (edit)Just to cover the simplest possibility, is your main function defined as: int main() If you use WinMain instead, the application won't run unless Windows is also running.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home