Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~7K People Reached
Favorite Tags
Member Avatar for bgx90

I have not found anything that addresses these questions. Any help is appreciated. If I have a class that has pointers to objects of a user-defined class as members, is there any problem with initializing those pointers with the initialization list of the constructor? For example, where A, B, and …

Member Avatar for bgx90
0
3K
Member Avatar for bgx90

This is my first time to try using STL maps. The code looks correct as far as I can tell, but when I try to compile a test file that does nothing but include the header for the class and declare a variable of that class, I am getting compiler …

Member Avatar for bgx90
0
3K
Member Avatar for bgx90

Hello. Does anyone know why strip_tags() is apparently returning an empty string in the code below? If I get rid of the strip_tags(), it works, but with strip tags, it displays the message about no ticket number being entered. I'm just sending it "http://[omitted].php?ticketNum=1", so there aren't even any tags …

Member Avatar for bgx90
0
364
Member Avatar for bgx90

Hello, everyone. For a Technical Writing assignment, I am to write a questionnaire, get responses from at least 25 people, and tabulate the results in report by March 16, 2011. I have chosen to ask about how often people read the nutritional information and ingredient lists on food packages. Only …

Member Avatar for ntrncx
0
181
Member Avatar for bgx90

Can anyone tell me why my recursive find function for a binary search tree isn't working? It keeps returning false when searching for items that are in the tree. Thanks. [CODE=cpp] template<class T> bool BST<T>::find(const T& sitem) const{ //Precondition: // A binary search tree exists // //Postcondition: // If item …

Member Avatar for bgx90
0
94
Member Avatar for bgx90

Can anyone tell me why setprecision is causing this error at runtime: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted The program ran fine; after I added << setprecision(2) << to a series of output, I received the error when trying to run the program. I have …

Member Avatar for bgx90
0
115
Member Avatar for bgx90

I need another set of eyes to look over this code. I must be overlooking something. I cannot figure out what the compiler's complaint is. When I try to compile, GCC gives me this error: sim.cpp: In function âint main()â: sim.cpp:21: error: ârunSimulationâ was not declared in this scope Can …

Member Avatar for NathanOliver
0
58
Member Avatar for bgx90

I cannot figure this out. Can anyone see what is causing the problem? This is the error I get when I try to compile with the GNU compiler: sortQS.h: In function âvoid sort(UList<U>&) [with U = int]â: test.cpp:13: instantiated from here sortQS.h:16: error: ârecQSâ was not declared in this scope …

Member Avatar for Banfa
0
150
Member Avatar for bgx90

I am trying to decide how best to implement a recursive quicksort on a vector. I know that I want to swap the first and middle elements of the vector and use the value in the first position as the pivot after the swap. After that, I have some questions …

Member Avatar for shashwat_2010
0
70
Member Avatar for bgx90

I am trying to place a friend function of a template class named sort in its own header file. I keep getting errors when compiling my test program. I have tried different things to fix it, but nothing works. My experience with template classes is limited as is my knowledge …

Member Avatar for bgx90
0
236
Member Avatar for bgx90

Hello. I am creating a template class derived from another template class to basically mimic the behavior of the STL stack for a school project. I am getting a compile time error when try to use a variable named "copy" when testing the overloaded '=' (defined in the base class) …

Member Avatar for bgx90
0
111