Hi all again,
I'm having some trouble now with calling functions. Even tough I have a header file being called in the correspondent .cpp file it gives me the consequent error (in Visual C++ 2008 Expression Edition):
.\AirLine.cpp(113) : error C3861: 'menu': identifier not found
Here it goes the code (I edited the code that I thought it wasn't useful since it's a bit long)
AirLine.h
Code:
#pragma once
#include "Form1.h"
#include "Person.h"
#include <cstdlib>
#include <iostream>
#include <string>
#include <map>
using namespace std;
class AirLine
{
public:
//int main(array<System::String ^>);
void menu(void);
void loginUser (void);
void registerUser(void);
};
AirLine.cpp
Code:
// AirLine.cpp : main project file.
#include "stdafx.h"
#include "AirLine.h"
static Person person;
//[STAThreadAttribute]
void registerUser()
{
(...)
registerUser();
(...)
}
void loginUser ()
{
(...)
menu(); // the error above goes here
(...)
}
void menu()
{
(...)
switch(option)
{
case 0: exit(1);
case 1: loginUser(); break;
case 2: registerUser(); break;
}
}
}
int main(array<System::String ^> ^args)
{
menu();
return 0;
}
I created the header file since I need to call menu() before and after the declaration of that function, as you can see above, and I thought it would solve my problems. Seems it doesn't.
Any guesses? :\
Thanks in advance,
Joćo