General C++ Programming - November 2011 (Page 29)

Windows / Sockets
 
hello. Having a small issue with my sockets. I'm trying to complete my server <-> client connection My server is a multithreaded TCP server, client is a crap...
[no replies]
negative power function
 
Hi people!!! Appealing again for your help. I have an assignment to write a RECURSIVE power function which will be able to rise base into positive as well as...
[11 replies] Last: But If I put those lines it gives me the correct output. Impossible. ... (by helios)
by pjasan
password
 
hello can somebody help me? i do a console aplication(object orientaded programming) and i need to insert some string but it has to show ***** (while t...
[1 reply] : http://www.google.com/search?q=site%3Acplusplus.com+password+asterisk+... (by Duthomhas)
by Wigen
Compiler error
 
Hi all, Can anyone help me to understand why i get the compilation error C2109: subscript requires array or pointer type. Thanks in advance. #ifndef ...
[2 replies] Last: So, how you declare a static vector of type boolean of size given by s... (by Wigen)
C++ test, help!
 
I have went through the following question, requiring the number of arguments from a member function takes. For example: struct A { int one(int); in...
[10 replies] Last: :-) (by superjack)
Using virtual functions to draw figures, does this make sense?
 
The book I'm using wants me to make a Figure class that has functions erase() draw() and center(). Then it has the subclasses Rectangle and Triangle. The fi...
[no replies]
error c2228 from use of object pointer array
 
I'm currently making a program that would run a video rental store that first reads a file and populates video and customer objects which all runs smoothly howe...
[no replies]
by smock
Reading lines in file
 
Hello, I'm running a program that reads lines from files. The program gets the total length of the file using the push_back container. however, I'm trying ...
[5 replies] Last: hamsterman's method actually works. some variables in my program were ... (by smock)
Trouble comparing two string arrays
 
Alright everyone, I'm having trouble making c++ compare two string arrays. It compares them once, correctly, but fails to continue comparing. It's down at if ...
[no replies]
by Jarr10
Code output
 
Can anyone tell me what this code outputs? int main() { int test=10; do { cout<<-test<<endl; } while (test->4) r...
[1 reply] : prog.cpp: In function ‘int main()’: prog.cpp:14: error: base ope... (by Caligulaminus)
destroying/deleting buffers at exit
 
I'm experimenting with OpenAL and SDL. In OpenAL, you create buffers and Sources, and there is a function to delete them. This might be a stupid question. Wh...
[1 reply] : When you exit, should you first delete your buffers and sources, or d... (by Disch)
by Tatipu
Removing Punctuation marks? leading/ending Punct.
 
I'm supposed to write a function that removes leading and ending punctuation. Like -- Because, "Ideally" (Banana) output should be Because Ideally ...
[no replies]
shuffle a vector
 
Hi, Is there a way to shuffle a vector deterministically? That means that Every time I run the program, I want it to shuffle in the same way so that the r...
[1 reply] : One of the templates for random_shuffle allows you to pass a function ... (by Zhuge)
by Tatipu
Help reading multiple inputs...
 
Alright so I'm supposed to do something like this: cout<<"Please enter some sentences below. A word '@@@' terminates the input.\n"; then input something lik...
[6 replies] Last: As much as I'd love to learn about vectors, because my Prof hasn't cov... (by Tatipu)
cin.get() not working as it is supposed to
 
In the following function definition, the compiler is not pausing to take the user input 'c'. However the compiler is pausing for taking the customer's name. ...
[6 replies] Last: thank you @bluecoder, I literally used your loop except that I declare... (by orchids16)
reading from file
 
Hello, when i try to use the down mentioned code to read from text file "sample below" the code doesn't read from the beginning of the file and not from the be...
[no replies]
please help me debug this round robin implementation
 
This is the code for implementing the round robin algorithm in c++ I am trying to display the list of processes based on remaining time. this program runs twi...
[no replies]
question about virtual apstract class.
 
hi, let's suppose you have one apstract class named class A: class A { }; ve also have two classes B and C which will inherit class A: class B :...
[no replies]
Trouble with 2d arrays
 
So I'm taking a matrix from a file. 5 6 R F F F F F F F F F F F R R R F F F F F F F F F F F F F F F And put it in to a 2d matrix called arr and convert...
[1 reply] : I think this will solve the problem for(i = 1; i < d1; i++) { for(... (by bluecoder)
Array boolean help
 
Hello I am new to c++ programming and know of the basics but i would ask for some advice on this matter. I know about arrays but i am not sure about boolean arr...
[1 reply] : Why burger1 , burger2 ...etc. you can do it in another way also . no... (by bluecoder)
November 2011 Pages: 1... 2728293031... 47
  Archived months: [oct2011] [dec2011]

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