User forums > General (but related to Code::Blocks)
arrays - what the heck?
MortenMacFly:
Well I tried to be as polite as possible but it seems you don't understand:
The forum description says: "This is NOT a general programming board.".
Why do we act so strict? Because if we shall answer all question of any beginner in any language and/or SDK that C::B supports we can finish working on C::B and only anser general programming questions. Please understand:
1.) We don't have time for that.
2.) Truly C::B related question might get lost or at least are answered in delay which is not what we want.
3.) And (more important) there are a *lot* other forums dedicated to questions like yours.
Try starting in the languages.c and/or languages.c++ newsgroup.
With best regards, Morten.
Balazs:
All these lots of posts could have been avoided with a simple 2-line straight answer for my question, shish... :roll:
Allright, but please consider my PM, and tell me what you think.
MortenMacFly:
--- Quote from: Balazs on August 14, 2006, 01:56:59 pm ---All these lots of posts could have been avoided with a simple 2-line straight answer for my question, shish... :roll:
--- End quote ---
I would have answered in a short way if the anser would have been a two-liner. But: To answer your question in a *good* way a whole paragraph is required with references to programming literatur. You would need to understand how instantiaten works and what a compiler actually builds out of a struct and/or variable. For now just believe what the compile tells you: You cannot assign arrays but structs.
(I'll read the PM in a minute.)
killerbot:
you struct or class does not have :
a) copy constructor
b) assignment operator
--> compiler will make a bitwise copy/assignment.
It seems the compiler is smart enough to know is a 2-dim array, and not just a pointer. But if the standard does guarantee this ,I am not sure.
On first sight I would say it is dangerous and bad code.
mandrav:
If you don't explicitely define a copy constructor for your class/struct, then the built-in one will be used which makes a byte-to-byte copy of the original. Happy now?
What's so hard to understand about "This is NOT a general programming board."?
Nothing to discuss about it: our rules and you have to respect them...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version