I have to write a programme where i should read string from a .TXT file. I have a problem with it. There are words in this file which are separated with space (for instance:DAD MUM CHILD etc). I would like to read the worlds like all words are read at a different place(so i would like to read the text from space to space). I tried to do it in several ways, but i also failed.
I would be greatful if anyone could help me. I will have a final exam at the end of the year and it is important to me.
Moreover, I use these libraries:
#include <string.h>
#include <stdio.h>
#inlcude <stdlib.h>
THX
It's in the std namespace. Either write std::string and std::cin or add using namespace std; at the beginning.
You also need to include <iostream> for std::cin.