Re: Why can't I do "new uint32_t[ size ]"
Re: Why can't I do "new uint32_t[ size ]"
- Subject: Re: Why can't I do "new uint32_t[ size ]"
- From: Per Bull Holmen <email@hidden>
- Date: Tue, 12 Jul 2011 22:00:23 +0200
2011/7/12 Mark Wagner <email@hidden>:
> Posting the exact source code you're trying would also be helpful,
> because the fragment you posted isn't valid C++: you can't execute
> code (the call to "new") outside a function.
Sorry, I tried to send a message to the list explaining I had fixed
the problem, I just clicked the wrong button in gmail (I normally use
yahoo mail), so it went to the person I was responding to instead of
the list.
About posting source code, yes, I see this being recommended over and
over again, but it's rarely helpful, because posting thousands of
lines of source code to get help fixing one single bug isn't going to
produce much help. Once when I had problems with a very tiny project I
actually did that, but it was more like 100+ lines, but still noone
bothered to wade through it all. Therefore I try to include only the
relevant information instead, and if the problem is somewhere else in
my project, I'm not expecting anyone on the list to find it.
As I explained, the code worked with "new unsigned int[ size ]" but
not "new uint32_t[ size ]". As the pointer was declared as uint32_t *,
and the relevant header files were included, and the compiler
recognized the type uint32_t elsewhere in the same source file, I
couldn't imagine the problem could be anywhere else in my project.
Anyway, it was fixed, and I'm not sure what did it. Perhaps it's
something about the way the clang compiler works that I'm not used to.
Per
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden