|
-
Jan 16th, 2002, 05:07 PM
#1
Thread Starter
Hyperactive Member
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".
-
Jan 16th, 2002, 05:56 PM
#2
transcendental analytic
first off are you using c or c++, i can't make it out from your syntax printf<<
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jan 16th, 2002, 06:30 PM
#3
Fanatic Member
LOL
Alcohol & calculus don't mix.
Never drink & derive.
-
Jan 17th, 2002, 02:53 AM
#4
Thread Starter
Hyperactive Member
c++, the code is fixed now
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|