Results 1 to 4 of 4

Thread: Pointers : I know a little more but...

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    England
    Posts
    312

    Pointers : I know a little more but...

    right, now i know that something like...
    Code:
    int main()
    {
    char bugger[10] = "holy mofoe";
    char *cartrak="";
    
    cartrak=&bugger;
    
    cout<<cartrak;
    return 0;
    }
    will make something like

    holy mofoe

    whereas the dsame without the pointer would return

    h
    ..........
    i dont know if thats right exactly but i tihnk its along them lines, but then again, why is that a good thing, cause surely if i made cartrak a string with [10] init, it would return the same!

    can someone gimme another example plz, a REALLYT simple one and kinda put loads of comments in and what would happen withouyt the pointer
    Last edited by JafferAB; Jan 17th, 2002 at 02:53 AM.
    Power to 2000 Electronic Donkeys!
    www.edonkey2000.com
    I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width