Click here to Skip to main content
15,896,063 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: diff betwn child and worker thread? Pin
David Crow30-Jan-06 3:30
David Crow30-Jan-06 3:30 
AnswerRe: diff betwn child and worker thread? Pin
Prakash Nadar30-Jan-06 4:34
Prakash Nadar30-Jan-06 4:34 
GeneralRe: diff betwn child and worker thread? Pin
Eytukan30-Jan-06 4:47
Eytukan30-Jan-06 4:47 
GeneralRe: diff betwn child and worker thread? Pin
Rage30-Jan-06 4:57
professionalRage30-Jan-06 4:57 
NewsRe: diff betwn child and worker thread? Pin
Laxman930-Jan-06 21:38
Laxman930-Jan-06 21:38 
QuestionControlling the main form in Borland C++? Pin
Priya..k30-Jan-06 1:32
Priya..k30-Jan-06 1:32 
AnswerRe: Controlling the main form in Borland C++? Pin
David Crow30-Jan-06 3:02
David Crow30-Jan-06 3:02 
AnswerRe: Controlling the main form in Borland C++? Pin
Prakash Nadar30-Jan-06 4:39
Prakash Nadar30-Jan-06 4:39 
QuestionOwner draw ListCtrl Pin
Patrick Markl30-Jan-06 1:04
Patrick Markl30-Jan-06 1:04 
QuestionDocument Conversion Pin
itbuff30-Jan-06 0:30
itbuff30-Jan-06 0:30 
AnswerRe: Document Conversion Pin
Sebastian Schneider30-Jan-06 1:17
Sebastian Schneider30-Jan-06 1:17 
QuestionOnNcCalcSize in CListBox Pin
Nishad S30-Jan-06 0:05
Nishad S30-Jan-06 0:05 
QuestionLoading an array inside a class.. Pin
Eytukan29-Jan-06 23:37
Eytukan29-Jan-06 23:37 
AnswerRe: Loading an array inside a class.. Pin
baldha rakesh29-Jan-06 23:58
baldha rakesh29-Jan-06 23:58 
GeneralRe: Loading an array inside a class.. Pin
Eytukan30-Jan-06 0:24
Eytukan30-Jan-06 0:24 
AnswerRe: Loading an array inside a class.. Pin
toxcct30-Jan-06 0:34
toxcct30-Jan-06 0:34 
because the initialisation is not made as the same time as the declaration (in a class), you cannot use such a thing.

i advise you to do it like this :
<font color=blue>class</font> test {
    <font color=blue>int</font> a[10];
 
  <font color=blue>public</font>:
    test();
};
 
<code>--------------------</code>
 
test::test() {
    a[0] = 1;
    a[1] = 2;
    <font color=green>//...</font>
    a[9] = 10;
}

now, if you have a very long list of values, then you can do the following as better practice :
<font color=blue>class</font> test {
    <font color=blue>int</font> a[100];
 
  <font color=blue>public</font>:
    test();
};
 
<code>--------------------</code>
 
test::test() {
    <font color=blue>int</font> tab[100] = {<font color=gray>...val array...</font>};
    <font color=blue>for</font> (<font color=blue>int</font> i = 0; i < 100; i++) {
        <font color=blue>this</font>->a[i] = tab[i];
    }
}




TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
GeneralRe: Loading an array inside a class.. Pin
Prakash Nadar30-Jan-06 0:38
Prakash Nadar30-Jan-06 0:38 
GeneralRe: Loading an array inside a class.. Pin
toxcct30-Jan-06 0:39
toxcct30-Jan-06 0:39 
GeneralRe: Loading an array inside a class.. Pin
Prakash Nadar30-Jan-06 0:41
Prakash Nadar30-Jan-06 0:41 
GeneralRe: Loading an array inside a class.. Pin
Eytukan30-Jan-06 0:45
Eytukan30-Jan-06 0:45 
GeneralRe: Loading an array inside a class.. Pin
Prakash Nadar30-Jan-06 0:52
Prakash Nadar30-Jan-06 0:52 
GeneralRe: Loading an array inside a class.. Pin
toxcct30-Jan-06 2:01
toxcct30-Jan-06 2:01 
GeneralRe: Loading an array inside a class.. Pin
BadKarma30-Jan-06 2:26
BadKarma30-Jan-06 2:26 
GeneralRe: Loading an array inside a class.. Pin
Eytukan30-Jan-06 3:02
Eytukan30-Jan-06 3:02 
GeneralRe: Loading an array inside a class.. Pin
Eytukan30-Jan-06 0:40
Eytukan30-Jan-06 0:40 

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.