The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Help UFies! (c++ woes) by tzulah 2004-07-14 13:33:11
I'm pulling my hair out. I'm SO frustrated over this.

I have a function that takes as a parameter void * buffer. The function performs its magic and is supposed to fill that buffer with a result.

My code looks something like this:

void *buffer;

ABunchOfData->PerformMagic(buffer);

It raises an exception, saying there was an access violation. Note that PerformMagic is a function that is part of a common package, and not my own code. Now the really frustrating part is that this code was working about 3 hours ago, and to the best of my knowledge, I didn't change anything. Gaaahhh! Where am I going wrong?
[ Reply ]
  Memory allocation by elehack2004-07-14 13:40:36
    Don't forget to free() what you malloc()... by williamashbless2004-07-14 13:49:06
  ptr initialization problem? by ManiacJoe2004-07-14 13:44:46
    it takes void * as a param by tzulah2004-07-14 14:02:20
  ok, I tried this: by tzulah2004-07-14 14:00:23
    Uh... by williamashbless2004-07-14 14:08:24
      Like I said, I am expected an integer by tzulah2004-07-14 14:16:41
        Uh, true, as long as your... by williamashbless2004-07-14 14:59:52
    If that works by ManiacJoe2004-07-14 14:11:32
      It works! by tzulah2004-07-14 16:18:39

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)