General C++ Programming - February 2011 (Page 14)

Vector sorting using Strategy pattern
 
// main.cpp Vector<Student*> students; AbstractStrategy* strategy; strategy= new NameAscendingSortStrategy; //push_back a couple of students into vec...
[8 replies] Last: Thanks alot. (by Mercurialol)
Password Cracker?!?!?!
 
ok so our teacher gae us a challenge we have to find/make a password cracker that can crack a numeric password that you enter into the program and was wondering...
[12 replies] Last: this is what i have so far but how do i encorporate letters #includ... (by jeromey55)
when to use exceptions and when to return values indicating success/failure?
 
One of the books I have read states that exceptions are thrown only in the event of serious errors and not so serious errors can be handled by returning values ...
[2 replies] Last: Exceptions should be thrown in any of the following cases: 1. An ... (by jsmith)
pixel coordinates
 
what's the fastest (or just a fast way) to search for a pixel and then return its coordinates? i've done quite a bit of research online, and there seems to be ...
[1 reply] : Fastest way: 1. copy area of screen to bitmap buffer 2. search buffe... (by Duthomhas)
Function pointer changing or overwritten?
 
void Receiver::start(){ running = true; std::cout << "updateThread " << (void*)updateThread << std::endl; _beginthreadex(NULL,...
[3 replies] Last: What compiler warning level are you compiling at? I'd expect a warnin... (by kbw)
Read numbers from stream
 
Hi Can any one help here I am trying to pull out two values from this data stream // IDE Code::Blocks C++ Feb 2011 // // File mattias_s.txt // // #G...
[3 replies] Last: Hi you where right, works correct now, my brain went dead. than... (by peter hurley)
by EeeK
Using Class Degrade Performance?
 
Hi I've trying to improve the maintainability by replacing a piece of C++ code from procedure to using classes with chain of responsibility design pattern (proc...
[5 replies] Last: You'll have to say more about what you've done to get a more meaningfu... (by kbw)
by pule85
Declare a pointer to an array of pointers as extern
 
Hello everyone. I'm trying to write a simulator. This simulator is maed of several .cpp files. I hereafter try to explain my problem as clear as possible: ...
[3 replies] Last: Sorry, i thouhgt my error was generated by the declaration of an array... (by pule85)
passing an array into a constructor
 
I have this class called Gaus which has these private members double *lambda; double *sigma; double contourC; double x; double y; double z; d...
[2 replies] Last: You have a problem here. I assume you want to copy the contents o... (by jsmith)
how come this compiles
 
Hi all; i feel i am a little unfamiliar with this,please see the code: #include <stdio.h> int myInt ; int myInt; //is it a redefinition error,help.......
[2 replies] Last: yes,i do. thank you.Now i have to review the difference between declar... (by sysabod)
Issues with quicksort
 
Hey everyone, I am new to the forum. I am a college student working on some homework, and I keep running into an error when trying to run my quicksort function....
[4 replies] Last: Oh man, how can I be so dazed. You don't have bottom for the recursion... (by simeonz)
ending a program early
 
Hi guys, I'm doing some moderately intensive numerical simulation in C++ on Ubuntu. When I test new boundary conditions/parameters I often see from the strea...
[9 replies] Last: JoR's original reply pretty much sums it up. There is no harm in using... (by Zaita)
Doubly Linked List InsertInOrder Algorithm
 
Hi. I'm getting a segmentation fault when I get to the loop in main trying to print out the characters. I think my insertInOrder and insert functions are wrong,...
[6 replies] Last: Here's begin() template <class T> void LinkedList<T>::begin() { ... (by drummin2somebeats)
Why isn't this working?
 
I'm making an XML parser, and right now I'm trying to debug it. I've narrowed the current bug down to my read_whitespace function, which is supposed to skip any...
[4 replies] Last: I figured it out - it wasn't the function that was the problem, but th... (by PiMaster)
pyramid w/ imputted base length
 
hi guys, i need help writing a code to produce a pyramid of *'s. the user needs to imput the base lenght and the pyramid should then form with the base number ...
[9 replies] Last: How about some pseudo code? var base var space var line input b... (by PiMaster)
by cg9289
Vector Indexing
 
Hi I am writting this code for my proffesor and this is my first time working with 2 dimmensional vectors. Here is my code int main() { vector<fl...
[2 replies] Last: The resason I am using bins.back() is because of the nature of the cod... (by cg9289)
What does this code mean?
 
So my professor has given me some sample code for our project and we are suppose to basically finish the program. Anyway I came across this puzzling if statemen...
[4 replies] Last: Thank you! (by dunsondog109)
by hanl1
Sizeof(arr) changes after being passed into a function
 
Guys I have this little problem here. I have a function that takes an int array as parameter, and in my main() i declare a fixed-size array and pass it into tha...
[10 replies] Last: Every time you pass a different size array in you get a whole new func... (by Duthomhas)
vector header file
 
hello! I am so new to C++ and I really need help. I am trying to create a STL vector header file and I do not even know where to start. I have an idea of wh...
[1 reply] : I don't think you're looking for a vector, it's either a Class or a St... (by Computergeek01)
Getting linking errors for _vector_new_ and _vector_delete
 
Hi , Previously my source is compiled with CC 4.1 compiler. Beacuse of some reason we moved the CC 5.5 compiler. When i am trying to compilation, all th...
[3 replies] Last: No, I can't, because I don't use that compiler. (by jsmith)
February 2011 Pages: 1... 1213141516... 25
  Archived months: [jan2011] [mar2011]

This is an archived page. To post a new message, go to the current page.