![]() |
|
|||||||
| Programmer's Corner Discussion forum for all aspects of programming and software engineering. Any software programming language welcome: C, C++, C#, Fortran, Java, Matlab, etc. |
|
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
Hello everyone,
I need help in programming the code for link list in C++, i have no software (compiler) and no deep experience in programming. so, please help me to start programming link list. i have seen tutorial on Google and on my book but i have not found the concept behind. like here:-> s Code:
truct node { int x; node *next; };
int main()
{ node *root; // This will be the unchanging first node root = new node; // Now root points to a node struct root->next = 0; // The node root points to has its next pointer // set equal to a null pointer root->x = 5; // By using the -> operator, you can modify the node // a pointer (root in this case) points to. }
Select All
|
|
#2
|
||||
|
||||
|
To understand the concept of Link List in C\C++ you have to understand the concept of pointers. So before explaining anything I would like to know do you understand pointers well enough?
Quote:
What software compiler??? C\C++ compiler, their are many like open source MinGW with Code::Blocks as IDE or you can use Visual C\C++ compiler, from Microsoft’s website you can download the latest version i.e.. Visual Studio 2010 (Express Edition is free).Or you go for Borland C\C++ compiler. Good Luck
__________________
Debjit Roy __________________ A man would do nothing,if he waited until he could do it so well,that no one would find fault with what he has done. - CARDINAL NEWMAN |
| The Following User Says Thank You to debjit625 For This Useful Post: | ||
RRITESH KAKKAR (05-02-2012) | ||
|
#3
|
||||
|
||||
|
Thanks for replying, will Dev c++ will work fine.
and i am not strong in programming whether its pointers. please guide me..!! |
|
#4
|
||||
|
||||
|
Quote:
|
|
#5
|
|||
|
|||
|
Mingw (as mentioned by Debjit above) is always a good shout. http://sourceforge.net/projects/ming...ingw-get-inst/
|
| The Following User Says Thank You to cheezewizz For This Useful Post: | ||
RRITESH KAKKAR (05-03-2012) | ||
|
#6
|
||||
|
||||
|
OK, The software has been downloaded so, please guide me how to start single link list program in C++...?
|
|
#7
|
||||
|
||||
|
OK, I am using DEV C++, it is showing error source file not complied...
code is:-> Code:
#include <iostream>
int main()
{
using namespace std;
cout << "hey";
system("PAUSE");
return 0;
}
Select All
i:\gw\lib\crt2.o(.text+0x8) In function `_mingw_CRTStartup': [Linker error] undefined reference to `__dyn_tls_init_callback' [Linker error] undefined reference to `__cpu_features_init' i:\gw\lib\crt2.o(.text+0x8) ld returned 1 exit status Last edited by RRITESH KAKKAR; 05-03-2012 at 06:03 AM. |
|
#8
|
||||
|
||||
|
OK, now ia m using code block and it is working fine for me..!!
So, please start with programing of single link list. |
|
#9
|
|||
|
|||
|
|
| The Following User Says Thank You to stahta01 For This Useful Post: | ||
RRITESH KAKKAR (05-04-2012) | ||
|
#10
|
||||
|
||||
|
You have to learn about pointers before learning about Link List... its like before learning to write we learn ABCD...
There is internet, and some good books too like "Thinking in C++ by Bruce Eckel" "C++ A Beginner,s Guide by Herbert Schildt" or by the inventor of the C++ language himself "The Design and Evolution of C++ by Bjarne Stroustrup" And any compiler will work, as they all compile the code to native machine language, some compiler don't obey the standards, so whatever compiler you use just follow the standard coding practice. While you are learning you don't have to bother about standards. Your code didn't work because of improper declaration of namespace. It should be like this Quote:
Good Luck
__________________
Debjit Roy __________________ A man would do nothing,if he waited until he could do it so well,that no one would find fault with what he has done. - CARDINAL NEWMAN |
| The Following User Says Thank You to debjit625 For This Useful Post: | ||
RRITESH KAKKAR (05-05-2012) | ||
|
| Tags |
| link, list, programming, required |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help required for this SMPS Battery Charger | xyz9915 | General Electronics Chat | 17 | 11-20-2010 08:24 AM |
| What sort of certification is required to sell electronics? | AltecDarpa | General Electronics Chat | 4 | 06-04-2010 10:29 PM |
| Counter Required in 12VDC Simple Circuit | rcayne | The Projects Forum | 1 | 09-12-2009 01:26 PM |
| Thread Tools | |
| Display Modes | |
|
|