0

This is my code

#include <iostream>
#include <vector>

using namespace std;

int main()
{
    
    vector <char> vowels {'a','e','i','o','u'};
    
    cout << vowels[0] << endl;
    cout << vowels[4] << endl;
    
    vector<int> test_scores {100,98,89};
    
    cout << "\nTest scores using array syntax:" << endl;
    
    cout << test_scores.at(0) << endl;
    cout << test_scores.at(1) << endl;
    cout << test_scores.at(2) << endl;
    cout << "\nThere are " << test_scores.size() << " scores in the vector" << endl;
    
    cout << "\nEnter 3 test scores:";
    cin >> test_scores.at(0);
    cin >> test_scores.at(1);
    cin >> test_scores.at(2);
    
    

}

It works perfectly fine on Xcode but I can't run anything at all on codelite. Could someone please guide me through and tell me what it is I'm doing wrong. The terminal only prints out "Hello World". Im sure the issue is something small and stupid.

Nate Eldredge
  • 48,811
  • 6
  • 54
  • 82
JJL
  • 71
  • 4
  • 2
    It sounds like it's compiling a different program, maybe a built-in example. Can you please describe the exact steps you are using to edit, compile and run the program? – Nate Eldredge Nov 04 '20 at 01:21
  • I was just executing the code with a hotkey. Building and executing doesn't run anything at all, it simply states that there are two errors that I'm completely unaware of since all of my code is running perfectly on Xcode. It doesn't matter what I put in as code; what prints out is the same exact thing "Hello world". I created a new workspace and folder, but the issue persists. I haven't the slightest clue as to what the hell I'm doing wrong. I am new to all of this so it could be something stupid. – JJL Nov 04 '20 at 02:10

0 Answers0