Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

putting c in a .cpp

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Lugie   Members   

122
Like
Likes
Like

Posted 23 January 2002 - 10:40 AM

is it possible to put C code into a .cpp? if so could somebody fill me in on how or what to search for on MSDN?

#2 BitBlt   Members   

386
Like
Likes
Like

Posted 23 January 2002 - 10:45 AM

Yes, but you can''t do it the other way around. C++ is an extension of C.

#3 PropellerBoy   Members   

122
Like
Likes
Like

Posted 23 January 2002 - 10:45 AM

Yup.
  
extern "C" {

// C declarations and C code


}

You''re going to want to do this for the function declarations (in the .h) and the functions themselves (in the .cpp)



#4 Lugie   Members   

122
Like
Likes
Like

Posted 23 January 2002 - 10:50 AM

thanks




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.