Subscribe to thetrh51        RSS Feed
-----

C in C++?!?!

Icon Leave Comment
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 ]

There are no Trackbacks for this entry

April 2014

S M T W T F S
  12345
6789101112
1314151617 18 19
20212223242526
27282930   

Tags

    Recent Entries

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)

    Categories