Click here to Skip to main content
15,894,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: dynamic allocation of arrays Pin
Iain Clarke, Warrior Programmer30-Sep-08 0:20
Iain Clarke, Warrior Programmer30-Sep-08 0:20 
GeneralRe: dynamic allocation of arrays Pin
Sauce!30-Sep-08 0:55
Sauce!30-Sep-08 0:55 
GeneralRe: dynamic allocation of arrays Pin
Iain Clarke, Warrior Programmer30-Sep-08 1:25
Iain Clarke, Warrior Programmer30-Sep-08 1:25 
GeneralRe: dynamic allocation of arrays Pin
Sauce!30-Sep-08 1:34
Sauce!30-Sep-08 1:34 
GeneralRe: dynamic allocation of arrays Pin
Iain Clarke, Warrior Programmer30-Sep-08 1:48
Iain Clarke, Warrior Programmer30-Sep-08 1:48 
GeneralRe: dynamic allocation of arrays Pin
Sauce!30-Sep-08 2:16
Sauce!30-Sep-08 2:16 
GeneralRe: dynamic allocation of arrays Pin
Iain Clarke, Warrior Programmer30-Sep-08 3:21
Iain Clarke, Warrior Programmer30-Sep-08 3:21 
GeneralRe: dynamic allocation of arrays [modified] Pin
Sauce!30-Sep-08 5:01
Sauce!30-Sep-08 5:01 
Thanks, I thought that's how you were meant to do it, but it just doesn't feel "right" because you're assigning a value to something outside of a function... so when does that value get assigned? During compile-time? At run-time?

I've done what you said and simply created an array of Tile's with 4 elements... Now i get the error

"Error 7 error C2148: total size of array must not exceed 0x7fffffff bytes c:\users\bryce\documents\visual studio 2008\projects\...\...\block.h 29"

My tile class certainly isn't that large... (half a terabyte if my calculations are correct!)

If I can't figure that out then I'll involve vectors >_>

EDIT: it may interest you to know that I also get the error "Error 2 error C2079: 'Block::TileArray' uses undefined class 'Tile' c:\users\bryce\documents\visual studio 2008\projects\...\...\block.h 29"

This is the problem I was coming across earlier and is the reason I thought it wasn't possible to do this. I have a forward declaration for the Block class right before my Tile class, but there is still no way for it to know it's definition. How can I overcome this?

modified on Tuesday, September 30, 2008 11:09 AM

GeneralRe: dynamic allocation of arrays Pin
Iain Clarke, Warrior Programmer30-Sep-08 5:31
Iain Clarke, Warrior Programmer30-Sep-08 5:31 
GeneralRe: dynamic allocation of arrays Pin
Sauce!30-Sep-08 5:43
Sauce!30-Sep-08 5:43 
GeneralRe: dynamic allocation of arrays Pin
Iain Clarke, Warrior Programmer30-Sep-08 6:02
Iain Clarke, Warrior Programmer30-Sep-08 6:02 
GeneralRe: dynamic allocation of arrays Pin
Sauce!2-Oct-08 5:05
Sauce!2-Oct-08 5:05 
GeneralRe: dynamic allocation of arrays [modified] Pin
Sauce!4-Oct-08 2:42
Sauce!4-Oct-08 2:42 
GeneralRe: dynamic allocation of arrays Pin
Sauce!4-Oct-08 5:19
Sauce!4-Oct-08 5:19 
GeneralRe: dynamic allocation of arrays [modified] Pin
Sauce!4-Oct-08 5:34
Sauce!4-Oct-08 5:34 
GeneralRe: dynamic allocation of arrays [modified] Pin
Sauce!4-Oct-08 12:53
Sauce!4-Oct-08 12:53 
GeneralRe: dynamic allocation of arrays Pin
Sauce!17-Oct-08 20:58
Sauce!17-Oct-08 20:58 
Questionno WM_MOUSEHOVER in an edit Pin
followait28-Sep-08 18:58
followait28-Sep-08 18:58 
AnswerRe: no WM_MOUSEHOVER in an edit Pin
Iain Clarke, Warrior Programmer30-Sep-08 0:25
Iain Clarke, Warrior Programmer30-Sep-08 0:25 
QuestionCListCtrl Problem Pin
Dhiraj kumar Saini28-Sep-08 18:53
Dhiraj kumar Saini28-Sep-08 18:53 
AnswerRe: CListCtrl Problem Pin
_AnsHUMAN_ 28-Sep-08 18:59
_AnsHUMAN_ 28-Sep-08 18:59 
AnswerRe: CListCtrl Problem Pin
Naveen28-Sep-08 19:01
Naveen28-Sep-08 19:01 
QuestionWrite a buffer to stringstream Pin
CodingLover28-Sep-08 18:43
CodingLover28-Sep-08 18:43 
AnswerRe: Write a buffer to stringstream Pin
Naveen28-Sep-08 19:04
Naveen28-Sep-08 19:04 
GeneralRe: Write a buffer to stringstream Pin
CodingLover28-Sep-08 19:08
CodingLover28-Sep-08 19:08 

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.