Click here to Skip to main content
15,909,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDialog BMP background w/o MFC Pin
smack_2k212-Jul-04 13:27
smack_2k212-Jul-04 13:27 
GeneralRe: Dialog BMP background w/o MFC Pin
erkanina12-Jul-04 21:11
erkanina12-Jul-04 21:11 
GeneralPlotting a position cursor using GDI Pin
rollei35guy12-Jul-04 13:09
rollei35guy12-Jul-04 13:09 
GeneralRe: Plotting a position cursor using GDI Pin
palbano12-Jul-04 14:58
palbano12-Jul-04 14:58 
GeneralRe: Plotting a position cursor using GDI Pin
rollei35guy13-Jul-04 3:01
rollei35guy13-Jul-04 3:01 
GeneralRe: Plotting a position cursor using GDI Pin
palbano13-Jul-04 6:00
palbano13-Jul-04 6:00 
GeneralRe: Plotting a position cursor using GDI Pin
rollei35guy13-Jul-04 8:45
rollei35guy13-Jul-04 8:45 
QuestionClass #1 creates array of type Class#2? Pin
So and So12-Jul-04 12:12
So and So12-Jul-04 12:12 
Hello,

I am very inexperienced in C++, so please bear with my question:

I am created a class "Tables" which is composed of an array of type "Columns" (another class i have created -- with its own attributes).
In "Tables.h" I have this initialization:

Columns t_Columns[45];

and in a method called "createTable" which is defined in "Tables.cpp" I have this code:

for(int i = 0; i < 45; i++)
{
t_Columns[i] = new Columns();
}

As you can guess, i want 45 instances of Columns in my Table.
My Problems is that the array cannot access any of the methods or attributes of the Column Class still.
I have even tried this:
in Table.h:
Columns * t_Columns[45]

in Table.cpp:
for(int i = 0; i < 45; i++)
{
*(t_Columns + i) = new Columns();
}

Can someone please point me in the right direction, i would be so grateful!

thanks in advance


AnswerRe: Class #1 creates array of type Class#2? Pin
So and So12-Jul-04 12:23
So and So12-Jul-04 12:23 
AnswerRe: Class #1 creates array of type Class#2? Pin
Weiye Chen12-Jul-04 15:14
Weiye Chen12-Jul-04 15:14 
Generalcreating a clock Pin
osal12-Jul-04 11:45
osal12-Jul-04 11:45 
GeneralRe: creating a clock Pin
ben212-Jul-04 11:48
ben212-Jul-04 11:48 
GeneralRe: creating a clock Pin
osal12-Jul-04 12:03
osal12-Jul-04 12:03 
GeneralRe: creating a clock Pin
Ravi Bhavnani12-Jul-04 12:58
professionalRavi Bhavnani12-Jul-04 12:58 
GeneralRe: creating a clock Pin
osal12-Jul-04 15:22
osal12-Jul-04 15:22 
GeneralRe: creating a clock Pin
J.B.12-Jul-04 19:20
J.B.12-Jul-04 19:20 
QuestionBrowser addon/toolbar ? Pin
ben212-Jul-04 11:32
ben212-Jul-04 11:32 
AnswerRe: Browser addon/toolbar ? Pin
Ravi Bhavnani12-Jul-04 13:00
professionalRavi Bhavnani12-Jul-04 13:00 
Generalthe SINUS Pin
The_Server12-Jul-04 9:54
The_Server12-Jul-04 9:54 
GeneralRe: the SINUS Pin
palbano12-Jul-04 10:03
palbano12-Jul-04 10:03 
GeneralAlignment and Packing of Structures Pin
jerry1211a12-Jul-04 7:29
jerry1211a12-Jul-04 7:29 
GeneralRe: Alignment and Packing of Structures Pin
David Crow12-Jul-04 8:34
David Crow12-Jul-04 8:34 
GeneralRe: Alignment and Packing of Structures Pin
jerry1211a12-Jul-04 8:51
jerry1211a12-Jul-04 8:51 
Generalwin32 drawing Pin
Anonymous12-Jul-04 7:00
Anonymous12-Jul-04 7:00 
GeneralRe: win32 drawing Pin
Navin12-Jul-04 10:57
Navin12-Jul-04 10:57 

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.