Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WIN32: *.c *.cpp compilation difference ???

Status
Not open for further replies.

guenter

Programmer
Joined
Jul 14, 2000
Messages
16
Location
AT
Hello,

My Question is about what's the difference at naming my Sourcefiles *.c or *.cpp ?
I'm using VC++ 6.0.

I've written an Win32 Application that compiles fine using the *.c file-extension.
Just after renaming the file to *.cpp I get some strange errors:

error C2440: '=' : could not convert 'void *' to 'struct linetranslateoutput_tag *'
at this Line: 'LPLINEDEVSTATUS pLineDevStatus = LocalAlloc(LPTR, BIGBUFF);'

The project ( compiler switches etc.) are exactly the same

any hints welcome

thanks
guenter


guenter
mail: porzer_guenter@hotmail.com
 
C++ does much stricter type-checking that plain-old C.

I recommend that you read Stroustrup's "The C++ Programming Language".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top