i basicly want to create a function wich returns a value if value is correct then say welcome to the lines ..
this is my coder can any1 help me im a bit confused
Code:#include <iostream.h> #include <stdlib.h> #include <fstream> // encode class test{ public: int test::acces(); int test::menu(); int acces_response; }; int test::acces(){ cout <<"acces granted 0.0 must be your lucky day"; int acces_response = 123 ; } int test::menu(){ cout <<"1. encode\n2. decode\n3. calculator\n4.credits"; } // decode // acces // main function int main(){ test test ; int x; ofstream a_file ( "LOG.txt" ); a_file<<"starting program at \n"; // still need to add date !!! cout <<"(c) 2004 \n"; a_file<<"log : function open acces() \n"; int acces = test.acces(); if (test::acces_response == 123){ cout <<"test succesfull... \n welcome to the lines soldier"; cin>>x; } }