So I have created program that will take a set of numbers from a file on the command line such as
89 42 168 21 336 11
1 1 2 3 5 8 13 21 34
1 0 3 8 5 6 7 4 9 2
100 200 50 400
and read them in and then sort them using a bubble sort. When I cout the sorted numbers however it only gives me the first line sorted and doesnt cout the other 3 lines. Why is this? Im new to programming so I apologize for any obvious mistakes I may have made. Thank you for all the help! :)
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <sstream>
using namespace std;
// Main Function
int main(int argc, char *argv[]) {
// Declaring strings, bool, ints, and char
string line;
int array[100];
int num, counter, i, j, tmp;
bool swapped;