GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 14-Apr-2006, 00:37
eddykk eddykk is offline
New Member
 
Join Date: Mar 2006
Posts: 2
eddykk is on a distinguished road
Exclamation

C++ Compiler Reads C Source Codes



Hello everyone.

I am an amateur of both C++ and C programs. So, I need help.

So far, what I've heard from www.cprogramming.com

is that "You should note that if you are programming in C on a C++ compiler, then you will want to make sure that your compiler attempts to compile C instead of C++ to avoid small compatability issues in later tutorials."

So, i'm wondering,

1) What specific problems would there be if C++ compiler tends to read C programming codes?

Anyway, the important thing is:

2) Can I continue doing my work permanently with C++ compiler for C programming codes instead of using C compiler?

I currently have Microsoft Visual C++ in hand. If this is possible, then I don't have to get another C compiler for my C program files.

Details from you people are much appreciated. Thank you in advance for helping out.
Last edited by LuciWiz : 14-Apr-2006 at 01:20. Reason: Removed (extremely annoying) color formatting
  #2  
Old 14-Apr-2006, 06:33
davis
 
Posts: n/a

Re: C++ Compiler Reads C Source Codes


Quote:
Originally Posted by eddykk
1) What specific problems would there be if C++ compiler tends to read C programming codes?

Anyway, the important thing is:

2) Can I continue doing my work permanently with C++ compiler for C programming codes instead of using C compiler?

I currently have Microsoft Visual C++ in hand. If this is possible, then I don't have to get another C compiler for my C program files.

If you name your C files using a .c file extension, then, by default, VC++ will compile them in "C mode" and not in "C++ mode."

An alternative is to set a compiler setting inside of your project settings so that it will force ANSI C.

If you really want to know more about the problems that "C" programs can have when being compiled with a C++ compiler, you can use the MSDN to take a look at "__declspec" to see what it says in the help files.

If you just want to avoid those problems, it is probably better to name your files using a .c file extension and check your project settings for ANSI compatibility. In other words, yes, you can use your VC++ compiler.


:davis:
  #3  
Old 15-Apr-2006, 08:23
eddykk eddykk is offline
New Member
 
Join Date: Mar 2006
Posts: 2
eddykk is on a distinguished road

Re: C++ Compiler Reads C Source Codes


Thanks for replying, davis.

But I've another problem.

Does MSVC++ have a bulit-in program of GNUPlot?

I'm trying to make a C program that produces a graph of a projectile motion. And I require a GNUPlot.

As far as I know GNUPlot is another different seperated-portable command-line driven interactive data and function plotting utility.

So:

1) Does MSVC++ have a bulit-in program of GNUPlot?

2) How to integrate GNUPlot with MSVC++?

3) To make a graph of projectile motion, isn't it necessary for me to write codes in MSVC++ and at the same time working with GNUPlot in another window?

4) How does this entire thing work in both different working-environment (MSVC++ and GNUPlot) ?

Please help. Thanks.
 
 

Recent GIDBlogManaging sshd Brute-force Attacks with iptables by gidnetwork

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking source codes of image, audio and video files onauc C Programming Language 5 26-Feb-2005 21:47
Browser's Language Interpreters onauc Open Discussion Forum 0 18-Nov-2004 18:53
Having a problem Chuckles Computer Hardware Forum 19 13-Sep-2004 12:17
web server in secure mode not connecting to http application tcsasp Apache Web Server Forum 0 06-Nov-2003 00:08

Network Sites: GIDNetwork · GIDApp · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 08:13.


vBulletin, Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.