Click here to Skip to main content
15,907,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Recursive problem Pin
Richard Andrew x6413-Dec-09 14:34
professionalRichard Andrew x6413-Dec-09 14:34 
GeneralRe: Recursive problem Pin
Haim Nachum13-Dec-09 14:48
Haim Nachum13-Dec-09 14:48 
GeneralRe: Recursive problem Pin
Richard Andrew x6413-Dec-09 14:51
professionalRichard Andrew x6413-Dec-09 14:51 
GeneralRe: Recursive problem Pin
Haim Nachum13-Dec-09 15:48
Haim Nachum13-Dec-09 15:48 
GeneralRe: Recursive problem Pin
Richard Andrew x6413-Dec-09 15:54
professionalRichard Andrew x6413-Dec-09 15:54 
General[Message Deleted] Pin
Omegaclass13-Dec-09 18:12
Omegaclass13-Dec-09 18:12 
GeneralRe: Recursive problem Pin
Nelek15-Dec-09 20:56
protectorNelek15-Dec-09 20:56 
QuestionHelp with arrays Pin
Chidori-chan13-Dec-09 8:43
Chidori-chan13-Dec-09 8:43 
I'm attempting (and failing horribly) to put a function that draws multiple circles into an array.
I will be using flags to turn the circles on and off, and I need to initialize it in my main function so the random generator won't run every time the screen refreshes. This is what I have so far in putting my circles in an array:

I get an error on this first line here saying : c:26: error: expected identifier or ‘(’ before ‘[’ token
I've no idea why, it looks like it's set up right to me

struct Row1[15] = {drawCircleRow1()}


int drawCircleRow1()
{	
	for
	(o=0; o<15; o++)
	{
	random_generator(0,3);		
	glPushMatrix();
	glTranslatef((o+1.9)*28,455,1);
		
		if (randomValue == 0)
		{
	glColor3f(0,.5,0);

		}
		else if (randomValue == 1)
		{
	glColor3f(.5,0,0);

		}
		else
		{
	glColor3f(0,0,.5);

		}
	glLineWidth(1.0);
	drawCircle(14,200);
	glPopMatrix();

	}
		
}


int main(int argc, char* argv[])
{
	
	glutInit(&argc, argv);

	ballPhysics();
	glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA);
	glutInitWindowSize(WIDTH, HEIGHT);
	glutCreateWindow("Bubble Buster");

	glutDisplayFunc(displayFunction);
	glutSpecialFunc(functionSpecial);
	glutKeyboardFunc(keyboardFunction);
	glutTimerFunc(1,timerFunction,0);


	gluOrtho2D(0, WIDTH, 0, HEIGHT);

	glClearColor(1, 1, 1, 0);

	glutMainLoop();
	return 0;


}

AnswerOT Pin
Luc Pattyn13-Dec-09 8:58
sitebuilderLuc Pattyn13-Dec-09 8:58 
JokeRe: OT Pin
CPallini13-Dec-09 10:19
mveCPallini13-Dec-09 10:19 
GeneralRe: OT Pin
Luc Pattyn13-Dec-09 10:27
sitebuilderLuc Pattyn13-Dec-09 10:27 
JokeRe: OT Pin
LunaticFringe13-Dec-09 10:33
LunaticFringe13-Dec-09 10:33 
JokeRe: OT Pin
CPallini13-Dec-09 13:21
mveCPallini13-Dec-09 13:21 
GeneralRe: OT Pin
LunaticFringe13-Dec-09 14:42
LunaticFringe13-Dec-09 14:42 
GeneralRe: OT Pin
CPallini13-Dec-09 13:23
mveCPallini13-Dec-09 13:23 
GeneralRe: OT Pin
Luc Pattyn13-Dec-09 14:05
sitebuilderLuc Pattyn13-Dec-09 14:05 
GeneralRe: OT Pin
CPallini13-Dec-09 20:39
mveCPallini13-Dec-09 20:39 
AnswerRe: Help with arrays Pin
LunaticFringe13-Dec-09 9:50
LunaticFringe13-Dec-09 9:50 
GeneralRe: Help with arrays Pin
Chidori-chan13-Dec-09 10:16
Chidori-chan13-Dec-09 10:16 
GeneralRe: Help with arrays Pin
Richard MacCutchan13-Dec-09 10:26
mveRichard MacCutchan13-Dec-09 10:26 
GeneralRe: Help with arrays Pin
LunaticFringe13-Dec-09 10:29
LunaticFringe13-Dec-09 10:29 
QuestionVisual C++ Drag and Drop and get filename and complete path Pin
ilu200713-Dec-09 6:54
ilu200713-Dec-09 6:54 
AnswerRe: Visual C++ Drag and Drop and get filename and complete path Pin
ilu200713-Dec-09 10:29
ilu200713-Dec-09 10:29 
AnswerRe: Visual C++ Drag and Drop and get filename and complete path Pin
Nelek15-Dec-09 20:51
protectorNelek15-Dec-09 20:51 
QuestionSpacebar: Animating a Circle to move across the screen, instead of jumping Pin
Chidori-chan12-Dec-09 21:30
Chidori-chan12-Dec-09 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.