General C++ Programming - August 2013 (Page 9)

by sl565
Adding a While Loop
 
This is my code for a digital clock. It only refreshes when i type in a letter. Can somebody please help me find a way to write it so it refreshes automatically...
[3 replies] Last: I see you edited your post, but you forgot the closing } of your while... (by LB)
by JP1099
Unexpected result decrementing end of range iterator in call to transform algorithm
 
Hi I found this piece code on the following site: http://www.interqiew.com/ask?ta=tqcpp01&qn=5 I predicted the outcome as being 01230 as I thought the p...
[2 replies] Last: Yeah I see it now! It threw me because the 'undefined behaviour' on m... (by JP1099)
Preprocessor again
 
#define __FS( B, NUM ) static unsigned imax const ZXLV##B = NUM; #define _FS( B, NUM ) __FS( B, NUM ) #define FS( B, NUM ) _FS( B, NUM ) #define FX( V, B ...
[11 replies] Last: I actually found a better method that relies on the binary of a value ... (by awsdert)
linked list
 
what is the process to delete everything from a singly linked list. Like S= 1->2->3->... I want to remove all the values from S and reuse it again to store n...
[2 replies] Last: Node *temp = head->next; while ( temp != NULL ) { delete head; ... (by abhishekm71)
by Yueeng
problem on a DFS-algorithm optimization
 
Hey guys, i've been working on a program that find the solution for the "Evil in Trouble" game. You can find the game here on google play: https://play.google...
[4 replies] Last: @Smac89 First of all thanks for your reply. And sorry i didn't men... (by Yueeng)
How can I create this function for the first part of the following program?
 
Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are ...
[1 reply] : http://www.cplusplus.com/doc/tutorial/functions/ (by Zhuge)
C++ Hangman
 
Hey guys, so I'm almost done with my hangman program, its just I don't know how to call the display_hidden_word function which is on line 28. The original f...
[15 replies] Last: @jmadsen Oh, I see. I didn't use isalpha in the syntax which is why t... (by omiexstrike)
SQL Server, std::thread, error
 
Hi, i got a method, filestodb() int filetodb(std::wstring szwf, SQLHANDLESTR *h); it executes sql commands, such as this: std::wstring szwComGetComp...
[3 replies] Last: if you use a synchronizing mechanism, you serialize the execution. The... (by coder777)
how to get a keypress within fixed amount of time
 
the program has to accept a keypress. It should wait for some fixed amount of time. If a key is pressed within this time, the program should call a function. If...
[3 replies] Last: @Techno: That would do normal execution if a key was not pressed rega... (by Superdude)
Bug - std::bind problems with non const.
 
So I am currently trying to debug some code in one of my projects. I'll list the code in question first and hopefully any relevant parts then go over the proble...
[5 replies] Last: Ahh thank you very much for that cire seemed to fix the problem and pl... (by closed account 3qX21hU5)
I need Help with my code Please Help.
 
Here is the description: Consider lists of numbers from real-life data sources, for example, a list containing the number of students enrolled in different ...
[7 replies] Last: How 'bout this? ... int times {0,0,0,0,0,0,0,0,0}; //Note: this has... (by Superdude)
Segmentation fault 11 in code (Beginner)
 
I want to see if I can flip the words in a sentence like the one below (Instead of "HELLO GOOD SIR HOW ARE YOU " it should be "YOU ARE HOW SIR GOOD HELLO"), but...
[5 replies] Last: C++ streams offer some built-in tokenizing abilities, you could levera... (by Cubbi)
std::thread, some quick, some "long"
 
Hi, I have some code, that is multithreaded, and, it has to do with SQL, and, file parsing. I have a method, filestodb() that parses, some files, and...
[6 replies] Last: Yes, the XML files. The library will probably ask you for a stream-lik... (by helios)
by Snaksa
List library
 
Hello! I'm trying to make a list that contains other lists. I want to use the <list> library /not my own implementation/. Here is what I do: list<list<i...
[3 replies] Last: by the way, I am not familiar, with std::list, but, I really do like s... (by hansaaa)
SDL2, events, destroywindow()
 
Working on a project that requires me to alter variables through a pop up window interface, and I seem to be having problems closing specific windows. I know...
[3 replies] Last: Sure. http://wiki.libsdl.org/APIByCategory (by helios)
Best Books for Learning C++?
 
Hey guys! What do you think the best c++ learning books are? I can't always watch Youtube videos everywhere I go on learning C++ and books seem to be the main l...
[5 replies] Last: Thank you call for the great answers! (by reedrocks58)
std::thread, with "hand-made" semaphore, no go ^^
 
Hi all, hope everyone is well ;) I am "experimenting" (;)) with some "thread" things, and, I have some code: int _tmain(int argc, _TCHAR* argv ) { ...
[3 replies] Last: i think, I can use std::mutex, instead of that "semaphore" thing! awes... (by hansaaa)
Catching a memory leak?
 
Does anyone have any tips on catching a memory leak in general? I know where the leak is coming from (approximately), but I've no idea how to fix it. For wh...
[5 replies] Last: I fail to see how can it make it easier. However, changing your list ... (by ne555)
MinGW: Additional Library Installation Options...
 
I have been reading up, and it seems that all I need to do to finish up the installation of a library is to add in the search path for the library upon compil...
[10 replies] Last: It does not seem to be working. I included string.h in the header tha... (by IWishIKnew)
by Wake
Convert comma-point - , to .
 
good night I have a string that receives a value, with comma eg 11,222 How do I convert a string to comma point? I'm trying to convert the string to float, h...
[4 replies] Last: Resolvido, usei std::replace(var3.begin(), var3.end(), ',', '.'); (by Wake)
August 2013 Pages: 1... 7891011... 28
  Archived months: [jul2013] [sep2013]

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