Function Overloading problem in Separate Files

Posted in C/C++ LANGUAGE, PROGRAMMING by edeguzman on May 7, 2009

I’ve been working on a small program that I need to separate the operation functions from the implementation file for a little of proprietary issue. I had an function overloaded in my operation file.

Below is just a sample code that will generate the same error from the program that I’m working :



Bug on STL Vector assignment operator

Posted in C/C++ LANGUAGE, PROGRAMMING by edeguzman on April 21, 2009

STL Vector is considered to be an alternative to a C-based style Array. It is more robust and less error-prone compare to the standard array. Standard array subscripts can fall outside of its range while the STL vector can detect error on its subscript falling outside of its range. Assignment operation (=) cannot be apply in Standard array while in STL vector it can be apply. Another advantage of STL vector is the passing of arguments to a function call, in standard array passing of arguments in function call requires you also to pass the array size but in STL vector does not requires the size. Those are the fundamental advantage of STL vector to the standard array.

As I was doing a program and I was using the STL vector there were two bugs that I found on STL vector, I considered them bugs for me because I believe its not on my code anymore. I spent almost an hour debugging on my program and only to find out that it was the vector that’s doing the bug.