Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I hope someone can help me. I'm running RedHat 9.0 and have just
started my first software development using the bundled gcc/gdb tools.
I'm missing something when it comes to using dynamic memory allocation.
I'm sure it's something super basic, but I must not be looking in the right
places because I can't seem to find out what I need to do despite a good
effort to find out.
In file junk.cpp, I type:
dummy = new int;
*dummy = 0;
printf ("Integer is %d\n",*dummy);
when I compile using "gcc junk.cpp", the compiler comes back with:
/tmp/cc6oZ9ez.o(.text+0x16): In function `main':
: undefined reference to `operator new(unsigned)'
/tmp/cc6oZ9ez.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
I'm missing a library somewhere, I think, but I can't seem to figure out which one.
I'm sure that lots of people use dynamic memory allocation and someone could
right off the top of their head tell me what to do. That would be great. This has
turned into "one of those things" for me and has been frustrating.
first point is that 'new' operator is not defined in stdio.h
u have to use malloc for allocating memory in c language
if u want to use new, then use iostream.h, name the file as .cpp and compile it using g++ instead of gcc