Click here to Skip to main content
15,899,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionstatic data member...HELP Pin
SyliaGallegos6-Feb-06 15:09
SyliaGallegos6-Feb-06 15:09 
AnswerRe: static data member...HELP Pin
Christian Graus6-Feb-06 15:26
protectorChristian Graus6-Feb-06 15:26 
QuestionDisplaying pictures instead of tabs in PropertySheet Pin
Allad6-Feb-06 13:45
Allad6-Feb-06 13:45 
AnswerRe: Displaying pictures instead of tabs in PropertySheet Pin
Owner drawn7-Feb-06 1:20
Owner drawn7-Feb-06 1:20 
GeneralRe: Displaying pictures instead of tabs in PropertySheet Pin
Allad7-Feb-06 5:10
Allad7-Feb-06 5:10 
QuestionHow to avoid redefine global variables??? Pin
Ming Luo6-Feb-06 12:33
Ming Luo6-Feb-06 12:33 
AnswerRe: How to avoid redefine global variables??? Pin
Stephen Hewitt6-Feb-06 12:51
Stephen Hewitt6-Feb-06 12:51 
QuestionDoes Array always need to allocate memory? Pin
Ming Luo6-Feb-06 11:56
Ming Luo6-Feb-06 11:56 
Hi all:
I am going to build a particle system which the system contains a set of particles where every particle is a struct contains some other arrays. The code is like following:

typedef struct{
float m; /* mass */
float c; /* charge */
float *x; /* position vector */
float *v; /* velocity vector */
float *f; /* force accumulator */
std::set<int> neigh; /* neighbour index array */
} *Particle;


typedef struct{
Particle *p; /* array of pointers to particles */
int n; /* number of particles */
float t; /* simulation clock */
} *ParticleSystem;

When I use this, do I need to allocate memory for every float array in every particle??? Or should I just add new elements to the arrays without explicitly declare the array sizes???
Thanks in advance!!!

Asura
AnswerRe: Does Array always need to allocate memory? Pin
Stephen Hewitt6-Feb-06 12:14
Stephen Hewitt6-Feb-06 12:14 
GeneralRe: Does Array always need to allocate memory? Pin
Ming Luo6-Feb-06 12:23
Ming Luo6-Feb-06 12:23 
QuestionCString weirdness Pin
Daniel Odom6-Feb-06 11:28
Daniel Odom6-Feb-06 11:28 
AnswerRe: CString weirdness Pin
Graham Bradshaw6-Feb-06 13:23
Graham Bradshaw6-Feb-06 13:23 
AnswerRe: CString weirdness Pin
RChin6-Feb-06 13:51
RChin6-Feb-06 13:51 
AnswerRe: CString weirdness Pin
Maximilien6-Feb-06 15:01
Maximilien6-Feb-06 15:01 
QuestionNeed help with Text Edit Box control Pin
the Jimmy6-Feb-06 10:58
the Jimmy6-Feb-06 10:58 
AnswerRe: Need help with Text Edit Box control Pin
Gavin Taylor6-Feb-06 13:17
professionalGavin Taylor6-Feb-06 13:17 
GeneralRe: Need help with Text Edit Box control Pin
Wim Engberts7-Feb-06 11:49
Wim Engberts7-Feb-06 11:49 
GeneralRe: Need help with Text Edit Box control Pin
the Jimmy7-Feb-06 17:52
the Jimmy7-Feb-06 17:52 
QuestionBest Book for Visual C++ .net? Pin
Mutty6-Feb-06 9:22
Mutty6-Feb-06 9:22 
AnswerRe: Best Book for Visual C++ .net? Pin
Christian Graus6-Feb-06 11:43
protectorChristian Graus6-Feb-06 11:43 
AnswerRe: Best Book for Visual C++ .net? Pin
mark gooding7-Feb-06 4:34
mark gooding7-Feb-06 4:34 
QuestionCompile unicode strings into VC6 project, get pointer to strings in stringtable Pin
Andre xxxxxxx6-Feb-06 8:58
Andre xxxxxxx6-Feb-06 8:58 
AnswerRe: Compile unicode strings into VC6 project, get pointer to strings in stringtable Pin
PJ Arends6-Feb-06 11:07
professionalPJ Arends6-Feb-06 11:07 
GeneralRe: Compile unicode strings into VC6 project, get pointer to strings in stringtable Pin
Andre xxxxxxx6-Feb-06 11:41
Andre xxxxxxx6-Feb-06 11:41 
QuestionReading MiniDumps Pin
Richard Andrew x646-Feb-06 8:58
professionalRichard Andrew x646-Feb-06 8:58 

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.