![]() |
|
#1
|
|||
|
|||
Using pointer as a parameterI have a pointer variable in main function.(linked list)
i need to pass that pointer to a function. in the function,it will change the pointer contents.(added new items) But i need the original pointer as it is. so, how can I use a copy of that pointer(link list) within that function. actually i need to getseveral paths in a diagrem,path is starting from (0,0). destination is (7,7). I have to find all the posible paths.Thats y i used linked list. So,I try to start from frist position. when path is divided , i need to get two different paths.So, i ll try to use that stroed linked list's 2 copies and want to store the rest. So,can any 1 gv me any idea please. |
|||
|
#2
|
|||
|
|||
Re: Using pointer as a parameterYou should probably pass a pointer to that pointer:
CPP / C++ / C Code:
Or, if it is fairly simple, you could pass the pointer as an argument to the function and return it from the function like so: CPP / C++ / C Code:
|
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MACRO to detect big / little endian | ahbi82 | C Programming Language | 14 | 26-Aug-2007 11:33 |
| Passing strings by reference | odrium | C++ Forum | 7 | 18-Jul-2007 23:27 |
| Help with syntax errors | PeteGallo | C Programming Language | 7 | 08-Aug-2005 21:30 |
| [Tutorial] Pointers in C (Part II) | Stack Overflow | C Programming Language | 0 | 27-Apr-2005 18:36 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The