I have a small program to put strings into vector like this,
Code:
#include<vector>
#include<iostream>
#include<string>

int main(){

std::vector<std::string> str;
std::string _holdInput;

while(std::cin>>_holdInput){

str.push_back(holdInput);
}
for(int i=0;i<str.size()-1;i++)

std::cout<<str[i]<<std::endl;

return 0;
}
My question is, if at the while loop's condition I would like to use std::cin.get(*charGot) in which charGot is declared beforehands as char*, and instead of using std::string in my vector, I change into character array whose object is declared as *str or str[], and in the while loop, I will push back charaters input from user into each vector's char array, will such a program turns out to work fine again, the same as when it is written in the above code ? If it doesn't work, can you tell me why ? if it does, why get() function is not oftenly used in most cases ? I have not written it yet because I think it may not work, I just can think that might be a solution to the problem I am having and the fact is that it is still quite difficult for me to make such a program, can you spend a little time writing that program for me ^,^
I am really thankful for that.
As stated in some other posts, I am still new to C++, I am so sorry for such a question....

I really hope I will be able to get any help from you...

Thank you so much in advance,

Regards,

-Milano