http://www.brainbench.com/ is a recognised online facility, recognised by most employers.
Type: Posts; User: SpaceCadet
http://www.brainbench.com/ is a recognised online facility, recognised by most employers.
I suggest you tokenise the char buffer that you populate from parsing the file into strings that represent words.
Insert these words into a std::vector container or std::list container (Check...
I am having trouble getting a template function to recognise that it has been passed a reference by a calling template function. This example code demonstrates the problem.
template<typename...
This does not do what your code does. It does meet your requirements.
int main()
{
const int MIN=0;
const int MAX=25;
int numbers[MAX];
int number=MIN;
catch (int index)
{
cout << "Exception thrown" << endl;
continue;
}
int calcDeficit(int x, int y)
{
return (x-y);
}
int main (void)
{
int MUFC_points=25;
int LFC_points=14;
Yes it does. However, an act of unbelievable programming is at the root of this.
Too heavy to explain. Thanks for you help, I think I'm on to it now.
I am working on replacing multiple overrides of a function within a legacy code base (all of which are virtual), with a single template signature.
My template function is as follows:
...
I will check whether I messed up at first base! (Specifying a C++ console application)
Thanks all.
I have just downloaded Visual C++ and am trying to write a noddy application. I am well versed in C++ and write for the unix platform.
I am therefore bemused by the compilation errors MS VC++...
I recommend you use a stl container instead of a linked list.
Have you copy constructor call an the assignment operator. Ensure that the assignment operator does not permit a copy of an object to...
That is more efficient and preferrable.
A polite observation regarding the constuctor implementation...
secretType::secretType(string name, int age, int weight, double height)
{
this->name = name;
this->age = age;
...
You can sort an array using the qsort C-style algorithm.
The list container provides sort and splice capabilities if you want to take a more C++ oriented approach.
How about a flush?
stream << "Data" << flush;
The Node* Next member variable is not initialised by the constructor that receives an int argument.
The GetNext function will therefore return an uninitialised pointer.
Assigning Current =...
A fine suggestion.
Unfortunately the legacy code must be built using a compiler version recognised and support by it's owners. The version of the Sun C++ compiler, they support does not build the...
Can anyone recommend a C++ refactoring tool that might help sort out a large legacy C++ application running on Solaris?
By large, I mean several million lines. The tool must be very good, because...
make_display_word may exhibit ndefined behaviour because it returns a copy of a local variable. You can deprecate this function by using a string constructor to initialise the display word string.
...
Agreed that the compiler is free to implement as it chooses.
I suspect the determination of the object Vtable is achieved via RTTI, but from an application perspective you should not care.
If...
By using a wrapper, clients of that wrapper can not use the std::list API directly to manage data held within the Wrapper::std::list mList member variable.
The ambition of this exercise is to...
I am working on piece of software written by a third party vendor. The third party has completely misunderstood the STL.
They have written a custom template wrapper object to contain a pointer of...
Hi,
I have a problem with 'slicing' when deleting an object allocated on the heap using a base class pointer. The base class is a std:list. Because the std::list does not have a virtual...