Thread: PASSINAG A bidimansional array at a function

  1. #16
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Please use full sentences. No one here can figure out what it is you're trying to do.

    Are you saying the size of the array may change, or the contents of the array may change? Any array you pass, unless you use const, may be modified by a function it's passed to. That's just the way it works. Declare it constant if you don't want its contents modified in the function. For that matter, if the function itself isn't going to modify the contents, declare its parameters as constant.

    If you're trying to say the array size may change, you're a bit out of luck there. You can't just resize arrays. If you want to have resizable arrays, use malloc, realloc and free, and just use pointers correctly.

    Otherwise, restate your question using full sentences, and try to clarify don't just say "????" and the like, because that helps no one.

    Quzah.
    Hope is the first step on the road to disappointment.

  2. #17
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    ok is passed by referance
    but now
    i need a function that keep in count the fact that
    the array passed can change...
    ...in dimnesions!

  3. #18
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    After the PM I just received, it's clear that this person is just a troll. Don't feed it.
    My best code is written with the delete key.

  4. #19
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    troll
    ???
    why do you offend me?
    i didn't offend nobody ....behave the same way...

  5. #20
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Code:
    void *resizablemultidimensionalarrays( void *array, size_t *dimensions, size_t sizes[] );
    I'll leave it as an exercise to the reader on how to call this function, resize the array, update the parameters, and handle the return value, and usage, correctly. Good luck.

    Quzah.
    Hope is the first step on the road to disappointment.

  6. #21
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    Well i don't know if someone felt offended ...sure i didn't want to do that...I thank all people responded to me and I understood my c++ code understanding mistake...
    Thanx Prelude...if you think to have a problem with me plese feel free to email me and we can clarify eachother thanx.
    No offending and here waisting time.
    Thanx

  7. #22
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    thank quzak,I'll think about it!

  8. #23
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    Your name fits, ABitLazy. I can barely understand what you're trying to say. Once again, no offense intended, but your grammar needs some serious work. Passable writing skills go a long way toward encouraging people to help you as well as helping those that do to understand your problem better.
    My best code is written with the delete key.

  9. #24
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    The fact you can understand exactly what i write prove my gammar and writing is pretty good !
    And one more think....the way you pesent yourself to me ..shows me that you are a person that doesn't merit any further consideration...bye guy farewell...
    you're arrogant ...that's all but that's evrything you've got afterall ...poor guy...

  10. #25
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    1) Prelude isn't a he
    2) Prelude is probably the one person who will help you the most. The rest of us will most likely stop trying long before she will.

  11. #26
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    And I really write better you do -no Passable at all-...if someone follow pre posted messages can understand everything very well...becouse a book to be understood requires to be read since the begining ...and who claims about my messages understaning sure dosen't do that. :-|

  12. #27
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >The rest of us will most likely stop trying long before she will.
    That sure is a pity. I'm on the verge of plonking him. I thought we only got people like this at the beginning of a school semester, not in the middle of the summer.
    My best code is written with the delete key.

  13. #28
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    Ok ,it is female.
    thanx ...noone says she isn't a good c++/c coder...but she's arrogant and unfair. that's all...bad attitude...
    but....female often have it!
    ok..patiance.

  14. #29
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    Persons like this?
    ok !
    Definitely you're a I am sillyI am sillyI am sillyI am sillyI am silly that's all !
    "verge ....etc..." ahahah
    ok! Do it!
    I am sillyI am sillyI am sillyI am silly you I am sillyI am sillyI am sillyI am sillyI am silly! I'm really ........ed of you stupid girl wants to cut me off ...Who do you believe to be?
    A stupid girl!

  15. #30
    Registered User
    Join Date
    Apr 2004
    Posts
    29
    and so?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 04:23 AM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. Passing my array to function
    By pooty tang in forum C Programming
    Replies: 8
    Last Post: 09-15-2004, 12:19 PM
  4. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM
  5. I need help with passing pointers in function calls
    By vien_mti in forum C Programming
    Replies: 3
    Last Post: 04-24-2002, 10:00 AM