Hello CF I write this blog because I encountered a rather weird issue, maybe anyone here has the same issue or even has solved this?
Here's the thing:
This compiles and run, I can see Hello printed in my terminal
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> v;
cout << "Hello";
// v.push_back(2);
return 0;
}
However when I uncomment the push back my code compiles but doesn't run! (I don't see Hello in terminal)
Commands I used: g++ main.cpp -Wall -o main
.\main.exe
There's no warning or error message.
I have tried compiling with MSYS64 (my main) and MSVC x64, same results.