Sponsored Content
Full Discussion: C++ Help
Top Forums Programming C++ Help Post 302274800 by Corona688 on Thursday 8th of January 2009 11:39:03 AM
Old 01-08-2009
Code:
board.cpp: In function ‘int main()':
board.cpp:66: error: ‘gameover' was not declared in this scope

That means that gameover wasn't declared. Looking back, I see you called it 'game', not 'gameover', and made it an int, not a bool, so the compiler gives up when it can't find the variable gameover anywhere. Fine, change the top of the while loop into while(game == 1)

Code:
board.cpp: At global scope:
board.cpp:95: error: expected constructor, destructor, or type conversion before ‘<<' token
board.cpp:97: error: expected declaration before ‘}' token

{ }'s always come in pairs surrounding one or more lines of code, if the compiler finds a } without a { it will stop with an error like it did on line 97. You have lots and lots of extra }'s, which also indirectly causes the error on line 95 -- the compiler thinks main()'s code block has already closed at this point, and won't let you call cout outside of a function. Remove these lines:
Code:
}

cout <<endl;

}

k++;

if( k ==42){

game =0;

}

}

Also, take a close look at where you have these lines:
Code:
k++;

if( k ==42){

game =0;

}

This is outside the loop I gave you, and would never have ran until the game already ended, which I don't think is what you want. Look for where I say you need to check for game over.
Quote:
Is there bits i need to change because i don't really understand it
What would you like explained? I wrote it as clearly as I know how.
 
FS_GETCELLSTATUS(1)					       AFS Command Reference					       FS_GETCELLSTATUS(1)

NAME
fs_getcellstatus - Reports whether setuid programs are honored in a cell SYNOPSIS
fs getcellstatus -cell <cell name>+ [-help] fs getce -c <cell name>+ [-h] DESCRIPTION
The fs getcellstatus command reports whether the Cache Manager allows programs fetched from each specified cell to run with setuid permission. To set a cell's setuid status, use the fs setcell command; fs_setcell(1) fully describes how AFS treats setuid programs. OPTIONS
-cell <cell name>+ Names each cell for which to report setuid status. Provide the fully qualified domain name, or a shortened form that disambiguates it from the other cells listed in the local /etc/openafs/CellServDB file. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The output reports one of the following two values as appropriate: Cell <cell> status: setuid allowed Cell <cell> status: no setuid allowed EXAMPLES
The following example indicates that programs from the cell "abc.com" are not allowed to run with setuid permission. % fs getcellstatus abc.com Cell abc.com status: no setuid allowed PRIVILEGE REQUIRED
None SEE ALSO
CellServDB(5), fs_setcell(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FS_GETCELLSTATUS(1)
All times are GMT -4. The time now is 11:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy