General C++ Programming - December 2012 (Page 38)

by ch01
Killing C++11 threads
 
Hi all, i have been trying to find out how to terminate a c++11 thread from executing. Any kind of help would be highly appreciated. thank you.
[1 reply] : There are no means provided in C++11 to forcibly terminate a thread. ... (by Cubbi)
Regarding files streams
 
Is there anything wrong with the following piece of code? I have one original file at some location. I copy it's contents excluding the blank lines to some tem...
[12 replies] Last: @Cubbi, Yes it worked. Thank you. (by vinaynaikwad)
by gghf
question about the FizzBuzz test
 
Hi, I am a new programmer and I found out about a somewhat funny test they give people for jobs that a lot of programmers end up failing. You have all probably ...
[3 replies] Last: The main reason being printf is C, cout didn't exist. You should be f... (by Hippogriff)
Trying to get this assignment completed Thanks in advance
 
I need to build a C++ function that forces the processor to multiply using the shift‐add. The multiplication code must be done in assembly, but I can use the...
[no replies]
by Prog24
Simple Class Problem
 
I had this program using a struct but now I have to write it using a class and it must contain atleast one Constructor and one Destructor. Ive read both of the ...
[5 replies] Last: Ok Ive got that fixed. Would you be able to explain to me how constru... (by Prog24)
by Lgodio
Referencing arrays initialized within a class
 
The following code compiles ok under g++ 4.6.3, but won't execute . Can anyone explain why ?? class Workspace { public: int n ; double **x1, *y1 ;...
[no replies]
Constant iterator through a set
 
This is probably really obvious, but im at a loss. So I have to iterate with a constant iterator through a set of objects to display them, but I am getting e...
[2 replies] Last: http://www.cplusplus.com/forum/articles/40071/#msg216270 (by ne555)
by Balrog
Multiple File Inclusion
 
I have an issue where I have files including other files, and these other files included include the original file, as well. If that was at all confusing, the f...
[1 reply] : If you've got circular dependencies like that, something is wrong with... (by MikeyBoy)
Applying arrays and Functions..please help?!
 
Help Please I was given an assignment today and I am at a total loss when it comes to where to even start. I missed the lecture where we were taught to use ...
[1 reply] : There are some pretty good C++ tutorials on this site right here. In ... (by MikeyBoy)
Assignment Q's?
 
NO.4 http://s7.postimage.org/77if7g0jv/Assignment_1_00002.jpg & http://s12.postimage.org/63zoc2iu5/Assignment_1_00011.jpg
[4 replies] Last: @cnoeval: Touche :) (by MikeyBoy)
by fafner
pointer being freed was not allocated
 
I'm having trouble with memory management in a recursive function. I'm trying to implement quicksort in C, and the function worked just fine until I decided to ...
[5 replies] Last: Peter87, smaller_s is the output from quicksort, and the code is: ... (by fafner)
Still dont understand how to make this stack templated
 
This is my stack #include <iostream> using namespace std; #define size 100 class Stack { public: Stack() : top(-1){} char pop(); void push(char c...
[1 reply] : This should be fairly straightforward to turn into a template class -(... (by guestgulkan)
birthday program help!
 
ok so i need to write a program to give the week a person was born given the birthdate. it can be any date from 1900-1999 1)prompt for date blah blah 2) divid...
[no replies]
putting mem address in pointer array
 
I am running the following code to try and copy the memory address of current location of string when an initial lower [a-z] are discovered. It works okay excep...
[no replies]
C++ and PHP
 
How can I use php to submit a value to a c++ program and then receive the result and display it. Here's an example of the php I am trying to use: <?php I...
[no replies]
How to edit specific part of line from a text file
 
Hello everyone, So what I'm trying to do is read data from a file, to then edit specific portions of it. Two types of people will be viewing it (the "employee...
[2 replies] Last: Oh, sorry. Fixed that, but any other help pogrady? (by closed account 426pfSEw)
cannot overload allocator because cannot define "less"
 
Have next piece of code: typedef struct _TMovedMols { private: union { uint32_t dummy; struct { unsigned int U...
[2 replies] Last: You haven't namespace-qualified "less". It should be std::less . Ac... (by MikeyBoy)
Class Question...
 
Okay, so I'm making a sprite class, and I am using SFML to do it. My question is what's the difference between doing: class Sprite : public sf::Sprite versu...
[2 replies] Last: Thank you a lot! - Kyle (by KyleMiles)
Reading From File
 
Hello, I'm having a bit of trouble while reading from a file. What I've actually done is created three classes a class one a class Date and a class two....
[2 replies] Last: PlayDB is the class one which has class Date as a data member and the ... (by rorylalx)
December 2012 Pages: 1... 3637383940... 43
  Archived months: [nov2012] [jan2013]

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