***Condition A Sep***

Team,

I have successfully used the below.
However I would like my program to only see SEP as a TAB.
IE an user takes a long row off of Excel, Libre Calc and puts in.
Obviously this is presuming of course they have taken the time to format their workbook properly.


1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
using namespace std;
int main(){
int input_1;
int input_2;

cout << "Hello, Welcome. << "\n";
cout << "Please Give Me Input 1 and Input 2" << "\n";
char sep;
cin >> input_1 >> sep >> input_2;
return 0;
}
//how to only say hey! only a tab is a sep buddy!// 
Last edited on
Hello shycas2008,

What you want is something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>

using namespace std;

int main()
{
	int input_1;
	int input_2;

	cout << "Hello, Welcome. << "\n";
		cout << "Please Give Me Input 1 and Input 2" << "\n";

	char sep;

	cin >> input_1;

	cin >> sep;

	// Code to check sep.

	cin >> input_2;

	return 0;
} 


Hope that helps,

Andy
Topic archived. No new replies allowed.