Hi friends, I'm having problems to use 2 consecutive "cin.get()".
The second get() is not been accessed. But if debug I can answer the name of second file.

Can you help me?

Cheers,

Sads

cout << "\nEnter the name of the first FILE : " << endl;
    cin.get (FileName1,256);
    cout << "\nEnter the name of the second file: " << endl;
    cin.get (FileName2,256); 

    cout << "\nEnter the number of the parameters: " << endl;
    cin >> parameters;

Can you use the getline function insetad?

string filename;
    getline(cin, filename);

David

Hi David,

I tried that but not function. I did:
cin >> filename after the first cin.get() and now is ok. But I can't agree with this problem.

Thanks again friend!

Cheers

Hi David,

I tried that but not function. I did:
cin >> filename after the first cin.get() and now is ok. But I can't agree with this problem.

Thanks again friend!

Cheers

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.