Alright so everything was going good and i had a decent understanding of everything until i reached ch6 where he introduces tokens. What exactly are tokens?I have searched everywhere and i cant seem to find an answer.
Tokens are basically all the things that make up a statement. Using the example from the wikipedia link:
sum = 2 + 3;
Tokenized and represented by the following table:
Lexeme Token type
sum Identifier
= Assignment operator
3 Integer literal
+ Addition operator
2 Integer literal
; End of statement
There is probably a better way to explain it, but I'm used to how the books and sites I linked you to explain it so I'm sorry that I'm not much help on that aspect.
[EDIT]
Don't know if this will help, but this is from The C++ Programming Language 4th Edition for the start of a calculator.
Ok. Thank you. I think i have a distinct idea of what a token is now. Also how long would it take to start making actual applications with gui or games?
Everyone has different opinions on that matter. I think once you have the basics (data types, variables, functions, pointers, references, classes/structs) you are good to jump into experimenting with gui or games because you can learn everything else as you go. Anything that you don't know by then you can always learn as you go.
You can take me for example - I've been learning and playing around with C++ for only a little over a month. As BHX Specter said, I just got the basics down and jumped straight into creating a card game. By now I've got most of its 'brain' code, working on graphics with Qt now, which I still struggle with, but it's a learning curve. And a lot of fun I might add.
What are all the basics i should know before i am able to create my own projects using just my own ideas? So far, i know the basics of input/output, conditional statements, and loops. Right now, im beginning on functions.
i/o, loops, conditional statements, functions, classes, structs, pointers, references should be enough to start on gui and games. You can learn the advanced things as you make games or gui apps.