rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are also a LOT of open source projects that are written in C++ that you can review for examples. Look on SourceForge.net, a leading site that hosts many major open source projects.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I like to say that Java is C++ with training wheels, and a 1 speed transmission... :-) For whatever it's worth, I do professional systems development with both languages, but for speed and efficiency, C++ wins hand's down. That said, Java has a LOT of support for stuff that would be a much more difficult to incorporate into C++ programs.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You aren't providing enough information to help you. Please elaborate.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Read the wikipedia article shown above. For simple programming effort, use the high/low method. First, you have to decide how many decimals of precision you need, and whether or not it preferable for the final result to be low or high. Using a binary search method, you can find the square root, or close approximation, of most any number in a pretty short time.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

int var = (x) ? y : z;
is equavalent to this:
int var; if (x) var = y; else var = z;

Do note that inline conditional statements like this can only reliably return an integer or compatible type, though you can return pointers with the appropriate casts. Caveat programmer! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As caperjack suggested, verify that you have properly applied thermal conducting paste/tape between the CPU and heatsink. Also, make sure that the motherboard is not driving the CPU faster than it's rated speed. CPU temperatures much over 50C are not good. My memory temperature is usually higher than that, but they start to flake out much over 100C. I try to keep them under 80C or so.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon the Linux OS you are going to use. Myself, I prefer to have a pure Linux host OS, and then use a virtual machine to run Windows. This is MUCH more secure, and you don't need to reboot the system to run the virtual machine. I also, at work, do it the other way around, running Windows 7 as the host OS, and Linux in virtual machines. Our business applications are mostly in Windows, but my development work is exclusively in Linux (C, C++, Java, System R, Python, etc), so I run Red Hat Enterprise Linux 5 and 6 in virtual machines there. On my home/consulting workstation/server I run a clone of Red Hat, Scientific Linux 6, and run Windows XP in a virtual machine.

If you plan on running PC games, then use 64-bit Windows 7 for the host operating system. With today's multi-core CPUs and 8+ GB of RAM, you can easily (and happily) run Linux in a VM with 1 or 2 cores and several GB of RAM, and not impact your Windows applications much to speak of. Using a good virtual machine manager, such as Oracle's Virtual Box (free and open source), you can take snapshots of the system periodically, so if you really screw the pooch, you can instantly revert to the last saved snapshot, quite painlessly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can use iptables to further firewall your servers, and enable SELinux extensions (Security Enhanced Linux), which can very much harden your systems. SELinux was originally developed by the US National Security Agency, and is (or should be) used on all high-security government systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually, /mnt should not be cleaned up, as /tmp may be upon rebooting. It is possible that the user has /mnt mounted (sic) from a volatile device, such as a ram disc. In any case, I have never had a problem with stuff in /mnt going away. Normally, dynamic device mounts (usb drives, etc) usally go into /media.

FWIW, I have done the LFS project and had no problems of this sort. In my opinion, it is a GREAT way to learn the internals of Linux systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried booting a live Linux CD/DVD/USB drive to see if it recognizes the device? Are you sure it is installed properly? It is a Sata device, not an IDE one?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You might want to be sure that either the board has a built-in speaker, or that the computer case speaker is properly connected to the board. If so, then it is probable that this board won't beep when it boots without problems; however, you might want to verify that with the board documentation. It should have that information available.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. This is not particularly useful. What is your OS+distribution? Have you installed all the NIS packages and tools? Have you configured NIS? Are you trying to run an NIS server, or just as a client? All of these questions need to be answered to move forward.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Install the gnu compiler tools. Make will come with that. Most installations of Ubuntu/Debian already include the GNU compiler suite, including make/gmake. If you need some other make, such as cmake, then you will need to install that package specifically. So, let me ask, just what are you trying to do?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go to the BT Linux site. This is a distribution intended for security professionals who need to do sophisticated system/network penetration testing. If that is your intended goal, then great! If not, then you should try another, more user friendly, distribution, such as Ubuntu, Mint, etc.

Anyway, here is a link to the BT web site: http://www.backtrack-linux.org/
They have tutorials, FAQs, user forums, and other helpful tools.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Some nice pre-built systems with Linux installed at the factory (everything is guaranteed to work): http://zareason.com/shop/Desktops/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You are going to need to purchase a retail version of Windows for this system. HP versions of Windows are locked to HP hardware (sometimes specific models). They are OEM copies that check for identifying information on the system when they boot up.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Worst case? Send it to a certified data recovery firm. It will cost you (possibly as much as $1000). The actual cost will be determined whether they can access the data without disassembling the drive and using specialized equipment to read the data from the platters directly. I mention $1000 because that is what I was quoted to get back the data from a 2TB array that died when the cooling fan failed over a weekend when I was away. So, a single 500GB drive should be a LOT less than that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Warranty or not, emachines (or whoever is the manufacturer of this unit) should be willing to provide you with a list of boot-up error codes, or an online accessible version of the user documentation that provides that information. If they don't, then run, don't walk, to another vendor and get a new machine!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Basically, you are on the right track, but you need to make the member variables pointers, and don't instantiate them in the derived classes. IE, something like this:

class X {
A* m_myA;  
// I know this doesn't work due to the abstract definition, but this is my goal
public:
    X(A* myA) : m_myA(myA) {}
}
class Y : class X {
B m_myB;
public:
    Y() : X(&m_myB);
}
class Z : class X {
C m_myC;
public:
    Z() : X(&m_myC) {}
}

Then, change your access code from p_x->m_myA.foo(); to this: p_x->m_myA->foo();. That should do what you want, although it is a bit clunky...

sblass92 commented: Yep, works like I want, thanks! +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This bit of code isn't particulary useful in showing us how you are decoding the data. Provide more source code please.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do what the original PC BIOS did:
1. read the boot sector into memory
2. execute
3. read the first boot partion sector into memory
4. execute

FWIW, I had to solve this problem in 1986 for our OEM version of QNX.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have a rule of thumb for this cruft that I have found to result in much fewer buffer overflow issues - provide double the theoretical maximum (plus a terminating null character). So, in this case I'd simply use a buffer size of 1024 and be done with it. There are other techniques that can be applied if there is a possibility that something could pass a string longer than that to you (a hacker, for example).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Upgrading or replacing any sony laptop stuff with non-sony gear is an exercise in futility. Don't bother trying.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

currentLink is pointing to head.next, which may well be null, hence the null pointer exception. Test it first using some code like this

if (null == currentLink)
{
    // have null pointer
}
else
{
    // Search or manipulate currentLink
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It is really in bad taste (and unethical) to ask people to do your homework for you. Make an honest effort to solve the problem, and we will be happy to help you, but you have to make a start.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you are running overclocked at 3.77GHz, correct? This may be causing issues with bus I/O. Try resetting the clock to normal and see what happens. Also, your power supply may be failing. When you overclock a system, it sucks up more power.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes, well think about the problem and write out a solution in words. First, you need to determine the scope of the number (thousands, hundreds, tens, ones columns, etc), then figure out the number of each found. Then you can encode the number as words. So, take the number 3532. How do you figure out how many 1000's there are? How many 100's? How many 10's, and so on? Write it out, possibly in pseudo-code. Once you are certain you have the process correct, writing code is trivial (relatively).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need the class name before the method in the implementation. IE,

class cone
    {
          private:
                double radius;
                double height;
          public:
          cone();
          void setvolume(double r, double h);
          double conevol();
    };
    //implementation
    void cone::cone() : radius(0.0), height(0.0)
    {
    }
    void cone::setvolume(double r,double h)
    {
          radius=r;
          height=h;
    }
    double cone::conevol()
    {
           double vol=(1/3.0)*(3.14159265)*radius*radius*height;
           return vol;
    }

Note that I fixed a few other issues as well... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

For simple C++ executables, you can just use the make command directly. So, if you want to build a simple C++ source file named my_application.cpp, you can just execute the command: make my_application
That will compile and link the executable for you quite nicely. A Makefile is unnecessary unless you have more than one source file to link.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Never heard of them. Most of these so-called certifications are pretty much useless for finding work as an IT or network administrator. Job experience is the best bet, and second is to host your own servers and learn by doing. The Red Hat certifications are somewhat better than many, but they will only serve to get you an interview, if you are lucky. You still need hands-on experience.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A lot of usb memory sticks come with some sort of encryption tools installed on them. Myself, I just reformat the entire device because most of that cruft is worthless. If you need to encrypt your data on the device, there are good full-disc encryption tools out there, including open source ones.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried implementing the new/delete functions out-of-line (not in the header file, but in the .cc/.cpp file? This may be an issue with some compilers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As WaltP said. In your Clothing constructor, you are copying too much data into the Code data member, corrupting the object. IE, this is part of the problem:

    Clothing()
    {
        strcpy(Code,"NOT ASSIGNED"); // This will corrupt the data structure.
        strcpy(Type,"NOT ASSIGNED");
        strcpy(Material,"NOT ASSIGNED");
        Size=0;
        Price=0;
    }
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Get this book: Algorithms + Data Structures = Programs
Author: Niklaus Wirth
Publisher: Prentice-Hall

Available from Amazon.com both new and used.

FWIW, Wirth was the inventor of both the Pascal and Modula programming languages. The original edition of the book used Pascal for the examples, but the content is applicable to any programming language. I've had mine since the early 1980's (it was first published in 1976), and I still use it. I am a senior systems engineer and software developer for one of the biggest cell phone companies in the world, am a published technical author, have software patents where I am credited as sole inventor, and am a director of an IEEE affiliate group. Let's just say that I live and breath software engineering... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you want help with your homework, then make an effort to do it first yourself. We aren't here to help you cheat, but we will help you if you make the effort.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The default speed of most serial ports is 9600 baud (about 8kbits/sec). You need to configure the speed on both ends (the computer as well as arduino board) to a higher speed. Most rs232 serial ports will support about 115kbps these days.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming that the printer on CentOS is shared, you should go to the printer manager tool: System->Administration->Printing. Select add new printer, and go to the Network Printer options. It should help you get to the remote printer from there. If for some reason the tool doesn't run, then run it with the command "sudo system-config-printer".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ubuntu-one? Mint is a clone of Ubuntu already. Please visit this web site for help in installing One: http://www.ubuntu.com/ubuntu/features/ubuntu-one

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Many Lenovo laptops have dual video adapters - the built-in Intel one, as well as often an nVidia one. If yours is such a system, then you can go into the BIOS and set it up to only use the nVidia hardware, which is a LOT better for graphics processing than the Intel gear.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The answer is "it depends". Most OEM Windows installations will check to see if the hardware is supported - device drivers have little to do with it. I know that HP Windows installation discs won't work with non-HP gear - I've tried it. I would suspect that Dell versions are similar in behavior. A purchased retail version will install on any compatible hardware, so you may have to reconcile yourself with purchasing a retail version, or switch to Linux which is free... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The IMEI number must either be on a label attached to the case, etched into the case / cover, or on a label inside the case. If the latter, you will have to take the cover off to read it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Someone is trying to be clever... :-) I think that they mean you get a lot of functionality for relatively little code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You have allocated the array of poitners rowptr, but not the elements of each row. As a result, your strcpy() functions will be corrupting memory. You also need to do this:

 for (row = 0; row < nrows; row++)
 {
       rowptr[row] = (char*)calloc(ncols, sizeof(char));
 }

As mentioned, you also need to change the type of rowptr to a char** instead of an int**, and change the allocateion to rowptr = (char**)malloc(nrows*sizeof(char*)); or rowptr = (char**)calloc(nrows, sizeof(char*));

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do your own homework... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try downloading and installing ClamWin, and then scanning your system (both files and memory) with that. It is free, open source, and works quite well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Adjusting the CPU and memory speed downward will help a great deal. Depending upon your power settings, both Linux and Windows will do this for you automatically when on battery power.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yeah, well after spending 20 years doing advanced C++ software design and development, the lack of multiple inheritance in Java drives me nuts! Interfaces are OK, but not the panacea that a lot of java developers think it is... sigh!

I just finished a significant SNMP framework for Java, and the lack of multiple inheritance was a major PITA, and made the resulting work much more complex and difficult than it should have been.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Work out the math, and then convert that to software. Also, this will be easier to do with Linux than Windows (in my opinion). If you haven't mastered the math to detect facial expressions from raw data, then you have no hope of succeeding in this quest. It is a good project, but an advanced graduate level one at best.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What is your intent for this? Usually, with C++ we use stubbed methods that return some meaningful, but not critical, value when called, so that the program can flow as indended. As for tools that do this, I am not aware of any, though they may exist.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

No. Compliance checks/analysis requires that the factors that indicate a system is in/out of compliance are very specific to a particular organization. Assuming your are paid by the hour, this is a nice contract to have. Do it dilligently, and be thorough in your report. FWIW, I am a senior systems engineer with a tier-one mobile phone manufacturer, and have been an IT consultant for years. There are no shortcuts for this sort of work. I am also a director of a major IEEE consulting network (and previous chairman) - this sort of work has been my bread and butter for years... :-)