So I learned the coolest thing today. I decided to do a little experiment to see if you could include C code in C++. I t worked! All I had to do was include the stdio.h file in the header and wala! Nothing to change other than the header. Here is my test code!
#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
puts("The C code worked!");
cout << "The C++ code worked!" << endl;
return 0;
}
0 Comments On This Entry
Trackbacks for this entry [ Trackback URL ]
Tags
My Blog Links
Recent Entries
-
-
-
-
-
C in C++?!?!on May 24 2012 02:33 AM
Search My Blog
0 user(s) viewing
0 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)
Categories
|
|



Leave Comment










|