Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: slider erorr Pin
dabs17-May-03 3:10
dabs17-May-03 3:10 
GeneralRe: slider erorr Pin
Renjith Ramachandran17-May-03 7:16
Renjith Ramachandran17-May-03 7:16 
GeneralStrings, codepages and HTMLEncode Pin
dabs17-May-03 0:21
dabs17-May-03 0:21 
GeneralVisual C++ 6.0 Standard vs. Visual C++ 6.0 Professional Pin
Anonymous16-May-03 23:44
Anonymous16-May-03 23:44 
GeneralQuestion about memory allocation of data members of a class. Pin
George216-May-03 23:36
George216-May-03 23:36 
GeneralRe: Question about memory allocation of data members of a class. Pin
Vikram A Punathambekar17-May-03 1:27
Vikram A Punathambekar17-May-03 1:27 
GeneralRe: Question about memory allocation of data members of a class. Pin
George217-May-03 3:05
George217-May-03 3:05 
GeneralRe: Question about memory allocation of data members of a class. Pin
Vikram A Punathambekar17-May-03 3:21
Vikram A Punathambekar17-May-03 3:21 
No, what I meant was that the constructor call and allocation of memory for the object go hand in hand.

You do not allocate space for the array explicitly. If you want to, you can- using a pointer. Like this:

class foo
{
int *p;//Pointer, but can be considered "array"
public:
foo()
{p=new int[1];}
};

Now you're ready to instantiate foo.

Hope this helps. Smile | :)

Any good book on C++ should be able to help you further. Try Schildt or Lafore. Even Bruce Eckel.


Vikram.
-----------------------------
My site due for a massive update

1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.

"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
GeneralRe: Question about memory allocation of data members of a class. Pin
George217-May-03 3:28
George217-May-03 3:28 
GeneralRe: Question about memory allocation of data members of a class. Pin
User 988517-May-03 11:40
User 988517-May-03 11:40 
GeneralRe: Question about memory allocation of data members of a class. Pin
George217-May-03 18:30
George217-May-03 18:30 
GeneralRe: Question about memory allocation of data members of a class. Pin
User 988517-May-03 11:43
User 988517-May-03 11:43 
GeneralRe: Question about memory allocation of data members of a class. Pin
Tim Smith17-May-03 1:41
Tim Smith17-May-03 1:41 
GeneralRe: Question about memory allocation of data members of a class. Pin
George217-May-03 3:08
George217-May-03 3:08 
Generalremoving a control and disable message during run-time Pin
yccheok16-May-03 21:22
yccheok16-May-03 21:22 
GeneralRe: removing a control and disable message during run-time Pin
valikac17-May-03 6:04
valikac17-May-03 6:04 
GeneralVisual C++ 6.0 - Rapid Application Development Pin
Anonymous16-May-03 20:46
Anonymous16-May-03 20:46 
GeneralGlobal static function Pin
Shah Shehpori16-May-03 18:53
sussShah Shehpori16-May-03 18:53 
GeneralRe: Global static function Pin
Neville Franks17-May-03 2:11
Neville Franks17-May-03 2:11 
Generalclass operators strange results Pin
Rui Dias Lopes16-May-03 16:52
Rui Dias Lopes16-May-03 16:52 
GeneralRe: class operators strange results Pin
Andrew Walker16-May-03 17:10
Andrew Walker16-May-03 17:10 
GeneralRe: class operators strange results Pin
Rui Dias Lopes16-May-03 22:29
Rui Dias Lopes16-May-03 22:29 
GeneralRe: class operators strange results Pin
Andrew Walker16-May-03 23:13
Andrew Walker16-May-03 23:13 
GeneralRe: class operators strange results Pin
Rui Dias Lopes16-May-03 23:18
Rui Dias Lopes16-May-03 23:18 
GeneralRe: class operators strange results Pin
Andrew Walker16-May-03 23:33
Andrew Walker16-May-03 23:33 

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.