diff options
author | Matthew Strapp <msattr@gmail.com> | 2019-04-02 16:30:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 16:30:00 -0500 |
commit | 8047f7ceadebae1afbd8d45e00bf203b04f9fe07 (patch) | |
tree | d2d471815722d1634d96a581ec239a4a9e5adb73 | |
parent | AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH (diff) | |
download | homework-8047f7ceadebae1afbd8d45e00bf203b04f9fe07.tar homework-8047f7ceadebae1afbd8d45e00bf203b04f9fe07.tar.gz homework-8047f7ceadebae1afbd8d45e00bf203b04f9fe07.tar.bz2 homework-8047f7ceadebae1afbd8d45e00bf203b04f9fe07.tar.lz homework-8047f7ceadebae1afbd8d45e00bf203b04f9fe07.tar.xz homework-8047f7ceadebae1afbd8d45e00bf203b04f9fe07.tar.zst homework-8047f7ceadebae1afbd8d45e00bf203b04f9fe07.zip |
Update strap012_HW5C.cpp
Diffstat (limited to '')
-rw-r--r-- | ee1301/wk5/hw5_directory/strap012_HW5C.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ee1301/wk5/hw5_directory/strap012_HW5C.cpp b/ee1301/wk5/hw5_directory/strap012_HW5C.cpp index bfd6709..d2d599f 100644 --- a/ee1301/wk5/hw5_directory/strap012_HW5C.cpp +++ b/ee1301/wk5/hw5_directory/strap012_HW5C.cpp @@ -22,16 +22,17 @@ int main() { void getInput(int input[SIZE][SIZE]) { string test; + //I would mainly like to thank some random person on StackOverflow for solving my problem while (getline(cin,test)) { istringstream ss(test); - string temp; - while(getline(ss,temp,' ')) + string foo; //foo is only needed in this one scope and will not be named further. + while(getline(ss,foo,' ')) maxRow=0; { - input[maxRow][maxColumn] = stoi(temp); + input[maxRow][maxColumn] = stoi(foo); maxRow++; } maxColumn++; } cout << maxRow << " " << maxColumn << endl; -}
\ No newline at end of file +} |