Hey im just trying to get back into c++ and i cant seem to solve why this is happning?

I know theres too many header files also, i just normally leave them there in practise things when im messing with colours etc.

Could you also please explain why it is not working so I can understand and not make the
same mistake in future? Thanks!

//Header files
using namespace std;

int level = 1;

 void cork()
 //cork: start village
 cout<<"\n\nYou enter the village";
 cout<<"\n1. Tavern\n2. Blacksmith\n3. Mage's Guild\n4. Training Area\n\n"; 


int main()
 string name;
 cout<<"Enter your name noble warrior\n";
 cout<<"\nYou are currently Level: " << level << "!";
 void cork();

Recommended Answers

All 3 Replies

Could you explain what's not working so we can understand what the problem is.

When I run the program it will not call the function cork, it stops at the end of the main function

line 3 remove the .h

line 38 remove the void

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.