Click here to Skip to main content
15,916,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: rookie question Pin
Anonymous23-Oct-05 3:25
Anonymous23-Oct-05 3:25 
GeneralRe: rookie question Pin
Binary011023-Oct-05 7:42
Binary011023-Oct-05 7:42 
QuestionCObList, MoveTo(), LineTo(), and more Pin
Anonymous22-Oct-05 17:09
Anonymous22-Oct-05 17:09 
AnswerRe: CObList, MoveTo(), LineTo(), and more Pin
Ravi Bhavnani22-Oct-05 20:31
professionalRavi Bhavnani22-Oct-05 20:31 
AnswerRe: CObList, MoveTo(), LineTo(), and more Pin
PJ Arends22-Oct-05 20:40
professionalPJ Arends22-Oct-05 20:40 
GeneralRe: CObList, MoveTo(), LineTo(), and more Pin
Anonymous23-Oct-05 5:34
Anonymous23-Oct-05 5:34 
AnswerRe: CObList, MoveTo(), LineTo(), and more Pin
Gary R. Wheeler23-Oct-05 1:30
Gary R. Wheeler23-Oct-05 1:30 
Questionabout the array Pin
hhgg22-Oct-05 14:40
hhgg22-Oct-05 14:40 
I met a question when using vc++ .Net 2003,that is, in a project, I declare an array in .h file, but when I initialize that array in .cpp file, the compiler always show me errors. Then how to initialize an array in vc++ .Net 2003?
following is part of the .h and .cpp file.

.h file

#pragma once
#include "stdafx.h"
#include "miscgl.h"
#include "cmath.h"
#include "public.h"


class COpenGLScene
{
public:
COpenGLScene(void);
virtual ~COpenGLScene(void);
......
// backcolor of the scene.
GLclampf backColor[4];
........

};

.CPP FILE

#include <windows.h>
#include <stdio.h>
#include "StdAfx.h"
#include "openglscene.h"

COpenGLScene::COpenGLScene(void)
{
//zRot = 0;
SetCamera();

// First way:
// if using this way, the compiler will give me errors, why and how to using this way?
backColor[] = {0.4f, 0.4f, 0.4f, 1.0f};

// second way:
// if using this way to initialize it, it's OK.
backColor[0] = backColor[1] = backColor[2] = 0.4f;
backColor[3] = 1.0f;

this->isInitialized = FALSE;

}

Can I only initialize the array in the second way?
If I declare a static array, the method to initialize it is easy, but not all the array must be static one at any time.
So, how to initialize the array like the first way?
AnswerRe: about the array Pin
PJ Arends22-Oct-05 16:05
professionalPJ Arends22-Oct-05 16:05 
GeneralRe: about the array Pin
Gary R. Wheeler23-Oct-05 1:36
Gary R. Wheeler23-Oct-05 1:36 
GeneralRe: about the array Pin
hhgg25-Oct-05 7:52
hhgg25-Oct-05 7:52 
Questionwhat is the best way to get html code? Pin
hamavreg22-Oct-05 14:01
hamavreg22-Oct-05 14:01 
Questioncopy folder Pin
stef880322-Oct-05 7:52
stef880322-Oct-05 7:52 
AnswerRe: copy folder Pin
Ravi Bhavnani22-Oct-05 8:12
professionalRavi Bhavnani22-Oct-05 8:12 
GeneralRe: copy folder Pin
stef880322-Oct-05 8:17
stef880322-Oct-05 8:17 
GeneralRe: copy folder Pin
Ravi Bhavnani22-Oct-05 8:24
professionalRavi Bhavnani22-Oct-05 8:24 
GeneralRe: copy folder Pin
stef880322-Oct-05 8:31
stef880322-Oct-05 8:31 
GeneralRe: copy folder Pin
Ravi Bhavnani22-Oct-05 8:42
professionalRavi Bhavnani22-Oct-05 8:42 
GeneralRe: copy folder Pin
stef880322-Oct-05 9:08
stef880322-Oct-05 9:08 
GeneralRe: copy folder Pin
Ravi Bhavnani22-Oct-05 13:43
professionalRavi Bhavnani22-Oct-05 13:43 
GeneralRe: copy folder Pin
Michael Dunn22-Oct-05 8:32
sitebuilderMichael Dunn22-Oct-05 8:32 
GeneralRe: copy folder Pin
stef880322-Oct-05 23:19
stef880322-Oct-05 23:19 
QuestionI want to learn vc++ Pin
yashmitl22-Oct-05 7:11
yashmitl22-Oct-05 7:11 
AnswerRe: I want to learn vc++ Pin
Ravi Bhavnani22-Oct-05 8:14
professionalRavi Bhavnani22-Oct-05 8:14 
QuestionBasic input from console but program crashes ! Pin
Aditi48422-Oct-05 4:27
Aditi48422-Oct-05 4:27 

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.