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 ]
← January 2022 →
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 |
Tags
My Blog Links
Recent Entries
-
Why photons (those beautiful quanta of energy) have masson Jun 28 2013 07:57 PM
-
Python worm?on Jun 27 2013 09:21 AM
-
Credit card Encrypter in Python using the CVD and Expiration dateon May 15 2013 06:32 PM
-
Radioactive half life converter thing?on Feb 24 2013 03:11 PM
-
back from break, well sort of...on Jul 10 2012 07:59 AM
Search My Blog
7 user(s) viewing
7 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)



Leave Comment








|