Programming Language

Would it be possible to create my own Programming language with C++ like this:
1
2
3
4
5
6
7
#include <iostream>
using namespace std;
int main()
{ 
typedef cout print;
typedef int num;
...


and so on?
That wouldn't be a new programming language. That would be you obfuscating C++ so it is harder to read.

And you wouldn't use typedef for things like variables such as std::cout; you would have to use #define's. You can only use typedef for types.
Oh okay thank you
I cant seem to change cout :/
How are you trying to change it?
He is obviously confused in thinking that cout is a type (which it isn't) - it is an object of type ostream
Last edited on
I tried #define cout and then put a new name
#define's are the other way around than typedef's.

#define MYNEWCOUT std::cout

Take note of how I included the std:: namespace part. It is best to do it like this.
oh thank you :)
Topic archived. No new replies allowed.