General C++ Programming - January 2014 (Page 4)

remove function not working
 
Below is my .h file and the code below that is my function that I'm having troubles with. Its suppose to take in a users topic and see if that topic exists, if ...
[3 replies] Last: it is simply one of three operators based on its context (multiplicat... (by snow 56767)
Stringstream object errant behavior!!
 
Hi folks! I do need fresh pairs of eyes to look into the puzzling behavior in the member function void customerType::returnBook(...) shown below. Just to pro...
[3 replies] Last: Thanks indeed cire for your response. I fully acknowledge the simplic... (by cire)
by Aidan
arrays
 
i have a problem with working with arrays, can anyone help me there?
[2 replies] Last: http://www.cplusplus.com/doc/tutorial/arrays/ (by snow 56767)
by Garion
What is a module?
 
Is a module basically a static class where everything is public (or a static struct)?
[6 replies] Last: Thanks for the link long double main. I think this link from that ref... (by Garion)
Reference Bug in C++?
 
Hi, Isn't there a bug here in the code? returnarg receives a temporary object which is destructed after the function is returned. i.e. r1's address is not ...
[4 replies] Last: @ L B I printed the destructor, which indeed was called for r1 after... (by jared11)
selection sort function
 
i wrote a function that uses a selection sort to sort an array of 25 integers. it calls a swap function i also wrote that swaps the integers. i compiled my code...
[3 replies] Last: thanks for the help. i fixed the problem (by miamidawgs)
by Jikax
C parser
 
Hello, I am working on a program that parses c code ( not c++ ) and gives you the possibility to add and remove methods. Actually it does a lot more, but that ...
[1 reply] : See if you can use clang or gcc parser for your purpose. (by modoran)
Application of bool variable question!! ( Appreciate if you could answer this)
 
I've been reading up the c++ for dummies guide and I've come to the section of demonstrating the bool variable. So the code from the book goes like this ...
[6 replies] Last: Alright thank you very much! Case closed ha ha (by receipter)
How to make graphical app/game in C++
 
Maybe a noob question but I want a good answer. So far I only made console and windows form apps but how do I make something like a 2D game with drawn object...
[1 reply] : Use a library, such as SFML: http://www.sfml-dev.org/ If you're feeli... (by MrHutch)
Dollar to Coin Value Program
 
Hi I have an assignment due and I am confused by it. I am currently using Xcode on a Mac to compile a c++ program. My class uses Codeblocks and I am having issu...
[1 reply] : these dont exist in your code ...inputquarters,inputDimes,inputnickels... (by Jaybob66)
casting with pointers
 
The below example confuses me a little. Basically, we have an unsigned 64 bit integer initialized to 0. Then we use the type cast operator, which will cast to a...
[2 replies] Last: uint64_t val = 0; uint8_t * p = (uint8_t *)&val; yes, this is valid ... (by Jaybob66)
by vecihi
Data Buffer with memory mapped files
 
Hello everybody, I have a data buffer project in Windows 7 x64 embedded OS (using Visual Studio 2008), that would work simply like that: One writer appli...
[2 replies] Last: Yes there are some examples for .NET (C# or VB), but I couldn't find m... (by vecihi)
Need help printing the contents of a string that also exist in a vector
 
Hi all, For the last part of this problem, if player 2 loses the game of hangman, I need to display the letters they did get right. In order to do that, I be...
[1 reply] : Please use code tags when posting code, to make it readable. http://w... (by MikeyBoy)
C++ Problem Encountered
 
Hello, Below is my code for Reading, Finding, and Converting strings from Text file, which is a project to my class in C++. The project is divided into 3 ...
[4 replies] Last: Just sharing to all people out there :D this one really helped my pro... (by vladeoff)
assigning to a member from a struct, obtained by []
 
Hello I'm trying to assign a value to a member of a struct that I called via an overloaded operator. I have the following code for the struct: typed...
[2 replies] Last: Thank you so much!! works like a charm I had no idea how to express i... (by lanjoe9)
Reading A Binary file into a vector
 
My program writes a vector to a file in binary. I want to erase the vector, then read the file to repopulate the vector then display. Basically I want to era...
[7 replies] Last: Sorry about posting twice. Thank you. EDIT: I forgot to put the push_... (by alee4408)
Need help using isalpha with string coverted to char array
 
Hi all, I am new to C++ and I have a two player word guessing game working well. However, I would like to be able to validate whether the word entered by playe...
[2 replies] Last: Thanks! This worked perfectly. I have implemented it in my code. Huge ... (by bat9998)
plz help,i'm beginer in c++
 
Hello!, Can you help me, with some of these tasks plz Task 1 . Create a program that will define a function named divr that takes two parameters x and y and...
[4 replies] Last: Thanks a lot for the advices. I am going through problems, by bearing ... (by graniti)
the value of 8 bytes for unsigned integers
 
I'm confused about the actual value of 8 bytes for unsigned integers. The below code suggests the value is 13217906525252912201: #include <stdio.h> #includ...
[1 reply] : It looks like you are printing an uninitialized value on line 9; why w... (by Zhuge)
Tricky question about i/o streams
 
Okay, so Im not quite sure how to explain this, so please bear with me. Im running MSVC++ 2010 on Windows 7, working with command line programs. When cin is ...
[5 replies] Last: It's not the program that's doing that, nor is it the IDE that's "addi... (by long double main)
January 2014 Pages: 123456... 25
  Archived months: [dec2013] [feb2014]

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