#include <iostream> using namespace std; int *i = new int; *i = 0; int &j = *i; j++; //cout << *i << endl;
I have a code like that, and I know this syntax is true but it gives warning in Visual Studio Code like this:
quiz2_q8.cpp:5:4: error: expected constructor, destructor, or type conversion before '=' token *i = 0; ^ quiz2_q8.cpp:7:1: error: 'j' does not name a type j++;
Am I missing a library to include? I thought iostream is enough for this quiz code.