General C++ Programming - September 2016 (Page 15)

function multiple thread static
 
int& fun() { static int i{ 100 }; return i; } if multiple thread call fun simultaneous...
[2 replies] Last: thanks! (by Wu zhen hai)
Variables not working in conditional statements?
 
int main() { int example = 0; int condition; cout << "Type your choice.\n"; cin >...
[4 replies] Last: -= will subtract whatever it is that is on the right hand side, so ... (by JayhawkZombie)
How to store bitset in a vector, or convert it to int?
 
I have code that converts a string into binary, but I want to be able to store that binary code in a...
[no replies]
Help Counting Printed Numbers
 
Hey everyone, I need some help with this homework assignment. I have to write a program that prints ...
[1 reply] : int totalPrimes=0; When you determine a number is prime totalPrim... (by SamuelAdams)
Writing to file causing weird characters to appear at end.
 
I'm trying to write a string to an empty file. The string is succesfully written, but what confuses ...
[1 reply] : Don't ever reuse a fstream object when it has already completed its j... (by jlb)
i don't have idea who write this, anyone can a help me
 
You should do a program from a character array allocated with new simulate the behavior of the opera...
[no replies]
need help with inline assembly
 
Hello guys I hope you can help me on this one! Im having an issue when I want to push callm1 c...
[1 reply] : Push the elements one by one: _asm { lea esi,callm1 mov e... (by skaa)
isspace & isdigit explict call
 
The below program deletes all whitespace from the string array. I was having problems with the isspa...
[no replies]
Opening .txt file
 
here is the code i wrote i am not sure whats wrong but the contxs.txt file its not opening. The code...
[6 replies] Last: turns out i placed the file in wrong folder. Thanks guys!!! (by adbharad)
Difficult exercise
 
Hey guys! Could you give me some tips on this reddit 3 easy challenge. Welcome to cipher day! w...
[9 replies] Last: glad I could help (by shadder)
How is this possible
 
<; Exported entry 1. posRegisterApplicationWithPackage ; Exported entry 2. posUnregisterApplica...
[no replies]
by AceK
Can you compile a 64-bit app with MingW?
 
Hi guys, This may sound stupid but I am curious, can one compile a 64-bit app with a MingW 32-bit...
[1 reply] : Mingw-w64 http://mingw-w64.org/doku.php Two MinGW builds based on Min... (by JLBorges)
by Dkob1
Main
 
class State { public: State (string stateName); // initialize with the given state’s informati...
[1 reply] : To compile your main function, you just need what you have above; it... (by MikeyBoy)
HW HELP PLEASE!
 
I am stuck on this assignment. Any help is greatly appreciated. Thanks in advance /////////////////...
[2 replies] Last: The teacher neglects to mention the copy assignment operator. A modern... (by keskiverto)
(Homework Problem) Text based adventure game using While loop, but don't completely understand why it's not working.
 
So I have been working on my intro to programming assignment and got to this problem where we must c...
[10 replies] Last: I would use integers instead of 'a','b','c'..... Because you can find ... (by shadder)
by Nyapp
ifstream gives unexpected output
 
So here's the class I'm having trouble with (I'm mainly talking about the loadlevel and access funct...
[5 replies] Last: You can do what ocreus suggested with std::istreams: uint32_t i; str... (by helios)
by bozmin
Problem to execute
 
hey every body. I keep getting this error message when I compile my code: UserClass.cpp:78:32:...
[7 replies] Last: UserClass.cpp lines 8-10: You have declared two constructors and a de... (by AbstractionAnon)
by O26rus
Please explain what this function does?
 
int function(int n) { static int i, j; for(i = 0, j = 0; i < 13; i++) { j...
[3 replies] Last: Technically, just the number of bits with value=1 in the least signifi... (by doug4)
by Roson
how do i display numbers in graphics mode?
 
I'm currently making a program where i need to show the scores at the top right screen. But the thin...
[4 replies] Last: With itoa it's quite simple: int num = 32; char buffer = {0}; itoa(... (by Thomas1965)
unwanted numbers in object member
 
In this code I pass object 'monster' as parameter through function 'connect _frags': connect_frags(m...
[3 replies] Last: Adding the type to function helped. Removing the 'cout' to cout<<monst... (by technologist)
September 2016 Pages: 1... 1314151617... 19
  Archived months: [aug2016] [oct2016]

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