Click here to Skip to main content
16,006,452 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: please help Pin
Christian Graus28-Dec-01 10:56
protectorChristian Graus28-Dec-01 10:56 
GeneralRe: please help Pin
Christian Graus28-Dec-01 11:23
protectorChristian Graus28-Dec-01 11:23 
GeneralRe: please help Pin
Ravi Bhavnani28-Dec-01 11:33
professionalRavi Bhavnani28-Dec-01 11:33 
GeneralRe: please help Pin
hhh28-Dec-01 11:52
hhh28-Dec-01 11:52 
GeneralRe: please help Pin
Ravi Bhavnani28-Dec-01 12:03
professionalRavi Bhavnani28-Dec-01 12:03 
Generalsorry, please check again... Pin
hhh28-Dec-01 12:08
hhh28-Dec-01 12:08 
GeneralRe: sorry, please check again... Pin
Christian Graus28-Dec-01 13:12
protectorChristian Graus28-Dec-01 13:12 
GeneralRe: sorry, please check again... Pin
Christian Graus28-Dec-01 13:19
protectorChristian Graus28-Dec-01 13:19 
I'm having a hell of a time replying here, I think you must be deleting posts ?

Anyhow, you said


Tim

i'm afraid i'm correct there, i AM getting memory allocated equal to 100 * sizeof(char) bytes somewhere. your suggested statement is considered illegal by some compilers - i'm using MS VC++


and I am trying to reply with this:

Tim is right, under VC++ the statement char * pChar = new char [100] allocates an array of 100 chars, and the statement char * pChar = new (char) (100) will ignore the first set of brackets and create room for one char, initialised to 100. I don't know what strange settings could cause VC to barf when asked to allocate an array, or why you think your statement creates an array, it quite plainly does not.

I'm guessing you've realised you were wrong ? In any case, char * pChar = new char[100]; is so valid that any compiler that rejects it should be burned at the stake.



Christian

After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

Sonork ID 100.10002:MeanManOz
I live in Bob's HungOut now

GeneralRe: please help Pin
Tim Smith28-Dec-01 12:28
Tim Smith28-Dec-01 12:28 
GeneralRe: please help Pin
Tim Smith28-Dec-01 13:03
Tim Smith28-Dec-01 13:03 
GeneralRe: please help Pin
hhh28-Dec-01 13:10
hhh28-Dec-01 13:10 
GeneralTIM, you're GREAT... Pin
hhh28-Dec-01 13:30
hhh28-Dec-01 13:30 
GeneralRe: TIM, you're GREAT... Pin
Tim Smith28-Dec-01 15:00
Tim Smith28-Dec-01 15:00 
GeneralRe: please help Pin
Ravi Bhavnani28-Dec-01 11:06
professionalRavi Bhavnani28-Dec-01 11:06 
GeneralRe: please help Pin
Christian Graus28-Dec-01 13:20
protectorChristian Graus28-Dec-01 13:20 
GeneralRe: please help Pin
hhh28-Dec-01 13:28
hhh28-Dec-01 13:28 
GeneralRe: please help Pin
Ravi Bhavnani29-Dec-01 7:14
professionalRavi Bhavnani29-Dec-01 7:14 
GeneralChanging languages ! Pin
Hadi Rezaee28-Dec-01 9:28
Hadi Rezaee28-Dec-01 9:28 
GeneralRe: Changing languages ! Pin
Konstantin Vasserman28-Dec-01 12:43
Konstantin Vasserman28-Dec-01 12:43 
GeneralSQLSvr2000 and returned FOR XML AUTO _bstr_t Pin
28-Dec-01 7:05
suss28-Dec-01 7:05 
GeneralBreakpoint problem----howto use it in a loop Pin
Charles Liu28-Dec-01 6:58
Charles Liu28-Dec-01 6:58 
GeneralRe: Breakpoint problem----howto use it in a loop Pin
James R. Twine28-Dec-01 7:09
James R. Twine28-Dec-01 7:09 
GeneralRe: Breakpoint problem----howto use it in a loop Pin
Todd Smith28-Dec-01 13:34
Todd Smith28-Dec-01 13:34 
GeneralRe: Breakpoint problem----howto use it in a loop Pin
Nemanja Trifunovic28-Dec-01 7:15
Nemanja Trifunovic28-Dec-01 7:15 
GeneralGetDeviceCaps problems... Pin
Braulio Dez28-Dec-01 6:05
Braulio Dez28-Dec-01 6:05 

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.