Click here to Skip to main content
15,910,009 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to extract taskbar button icon Pin
FlyingBear2-Aug-07 23:21
FlyingBear2-Aug-07 23:21 
Questionhelp me Pin
philiptabraham2-Aug-07 19:04
philiptabraham2-Aug-07 19:04 
AnswerRe: help me Pin
Anurag Gandhi2-Aug-07 19:23
professionalAnurag Gandhi2-Aug-07 19:23 
GeneralRe: help me Pin
philiptabraham2-Aug-07 19:36
philiptabraham2-Aug-07 19:36 
GeneralRe: help me Pin
philiptabraham2-Aug-07 19:51
philiptabraham2-Aug-07 19:51 
GeneralRe: help me Pin
Anurag Gandhi2-Aug-07 21:02
professionalAnurag Gandhi2-Aug-07 21:02 
AnswerRe: help me Pin
Hamid_RT2-Aug-07 20:56
Hamid_RT2-Aug-07 20:56 
QuestionVector inside a structure Pin
vinodkoul2-Aug-07 18:46
vinodkoul2-Aug-07 18:46 
Hi,
I am facing a peculiar problem with vectors. I define a vector in my program with a size given by another variable. Works fine.
But the same thing, I try inside a structure gives me a copiler error of C2061: sytax error : identifier size

Code:
#include <vector>
void main()
{
int size =4;
vector<int> vect(size);

vect[0] = 3;
vect[1] = 2;
vect[2] = 1;

display(vect);
}
This works fine But below code doesnt

int gsize =3;
struct VectorStruct
{
vector<int> vect2(gsize); //error C2061: syntax error
// : identifier 'gsize'
};

and even if i try to give a vlaue instead of variable it fails

struct VectorStruct
{
vector<int> vect2(2); //error C2059: syntax error : 'constant'
};

Can someone help me out. I cant figure out what going wrong






Vinod
AnswerRe: Vector inside a structure Pin
Stephen Hewitt2-Aug-07 19:14
Stephen Hewitt2-Aug-07 19:14 
AnswerRe: Vector inside a structure Pin
cp98762-Aug-07 19:15
cp98762-Aug-07 19:15 
GeneralRe: Vector inside a structure Pin
vinodkoul2-Aug-07 20:12
vinodkoul2-Aug-07 20:12 
QuestionRe: Vector inside a structure Pin
vinodkoul2-Aug-07 20:43
vinodkoul2-Aug-07 20:43 
AnswerRe: Vector inside a structure Pin
cp98762-Aug-07 20:54
cp98762-Aug-07 20:54 
QuestionPrint value of key pressed...? Pin
deostroll2-Aug-07 18:22
deostroll2-Aug-07 18:22 
AnswerRe: Print value of key pressed...? Pin
bob169722-Aug-07 18:43
bob169722-Aug-07 18:43 
QuestionRe: Print value of key pressed...? Pin
deostroll2-Aug-07 18:59
deostroll2-Aug-07 18:59 
AnswerRe: Print value of key pressed...? Pin
David Crow3-Aug-07 3:52
David Crow3-Aug-07 3:52 
AnswerRe: Print value of key pressed...? Pin
bob169723-Aug-07 17:39
bob169723-Aug-07 17:39 
Questionaccess violation in int array Pin
George_George2-Aug-07 16:53
George_George2-Aug-07 16:53 
AnswerRe: access violation in int array Pin
Sameerkumar Namdeo2-Aug-07 17:17
Sameerkumar Namdeo2-Aug-07 17:17 
GeneralRe: access violation in int array Pin
George_George2-Aug-07 18:24
George_George2-Aug-07 18:24 
AnswerRe: access violation in int array Pin
JudyL_MD3-Aug-07 1:48
JudyL_MD3-Aug-07 1:48 
GeneralRe: access violation in int array Pin
George_George3-Aug-07 21:42
George_George3-Aug-07 21:42 
QuestionCrashes Pin
dellthinker2-Aug-07 16:50
dellthinker2-Aug-07 16:50 
AnswerRe: Crashes Pin
Hans Dietrich2-Aug-07 19:05
mentorHans Dietrich2-Aug-07 19:05 

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.