jeudi 1 novembre 2018

Unclear error: " '::main' must return 'int'". I looked on forum already

I know this is already on the forum. But I get that error which I already looked up and this is my main function:

#include "Exceptions.h"

#include <iostream>
#include <string>

int main()
{

   return 0;
}

But still when i execute make command it says: src/testprogramma.cpp:6:11: error: '::main' must return 'int' void main().

Obviously i understand the error that main must return an int and therefore the main should be int main (something something) { code return 0; }. But that's what I find so weird cause there is no simpler code then this.

Aucun commentaire:

Enregistrer un commentaire