Now, the program has a weird behaviour, when I run the program It works fine for the first loop in the while, but after that It has a strange behaviour
yes, It doesnt stop in getline(cin,word);I mean one it has asked in the first loop(with a normal behaviour),It does this:
Insert board name: Insert board amount:
function getline by default reads everything until it encounters the newline character '\n' which is also extracted but discarded as well.cin will read one word leaving the newline character behind for the next call to getline to find it before you have a chance to input anything.That is the reason why it seems like it is skipping the getline while in fact it does not.It just terminates immediately because of the newline character left by cin.And that is also why the call to cin.ignore() fixes the problem.Because it clears the newline character left by cin.
I am currently studying computer science and I find C++ very interesting to work with.Unfortunately I am currently busy with other lessons as well.If you come up with an idea of a project send me a message though :)
I'm electronic engineer, I my final proyect was Espresso-II, it's an algorithm to simflicate boolean functions, and I did that in c++...so now I'm starting to remeber and studying for myself C++, It's quite different than electronic but I can find it quite interesting,ok I will if I find something interesting.