Alright guys I have a question. I am trying to write a custom data type. Let me explain a little further. I'll start out at the base.
te_char (you don't really have to worry about this.
>char c_char
>rgb color
te_word (weird part)
>int type (based on an enumeration
>vector <te_char> whatever
>what ever else
>inline void conv_type_to_word
te_body : public ostream (I want it to work this way atleast)
>vector <te_word> whatver
I want to be able to write to the te_body's vector like you would a cout.
Like
te_body awesomesauce;
awesomesauce << "SMILEY EXTREME =" << 7;
OR
I'd like to be able to dynamically write to a te_word with any data type. At that I can handle converting to it. I just want to litteraly make a functuion with a dynamic amount of arguments or make an operator that is like the "cout <<" that writes to the vector of te_words. I can determine the type of input within that function or operator.
I tried this to no avail:
#include <cstdlib>
#include <iostream>
using namespace std;
class lol: public ostream
{
};
int main(int argc, char *argv[])
{
lol b;
b<< "HI" << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
It had no errors but crashed upon running.