General C++ Programming - November 2015 (Page 22)

PIMPL and header files
 
If I'm implementing a class using the PIMPL idiom, should I declare a header file for the private implementation too? Is it useful to do so or it makes no diffe...
[1 reply] : The whole point of PIMPL is to hide the implementation. If you place ... (by kbw)
Reading/Searching text files
 
I have a class called "Type". In class type I have string name, string weakness , string resistance , string immunity . I have a file with the format: Name=typ...
[1 reply] : string weakness , string resistance , string immunity You need to us... (by kbw)
How do you create movie queue?
 
Hello guys, I am currently working on the movie netflix queue project. I need help with some codes. This is how far I got to: #include <iostream> int mai...
[3 replies] Last: I think you're expected to use some other data structure as a vector o... (by kbw)
by lapatp
Report card / gpa
 
Hello, I am having difficulty on my assignment and have no idea what is wrong or where to fix my code. The assignment is inputting data from a file into arrays,...
[1 reply] : What's the difficulty? Is it not outputting as expected, or getting an... (by newbiee999)
Parallel code hangs
 
Hello, I am trying to find a reason why MPI/Parallel code hangs. The code works well when I do mpirun -n 1 and mpirun -n 2 seems to run without issues eit...
[no replies]
help in program ( assembly language )
 
.
[5 replies] Last: COMP103 Assignment 3, shocking to see this online. (by closed account L307fSEw)
how convert from string to char*?
 
how can i convert from string to char*? string *strreaded=NULL; char *chrreaded=NULL; //on window procedure: //.................. consolewindow *richedit =...
[10 replies] Last: yes. you both have right. my problem is that i lose the pointer :( (i ... (by Cambalinho)
Reading specific bits from an 8 bit binary number
 
I'm getting a return value in the form of an 8 bit binary number. For example: 10110010 I need a function that will tell me specifically which bits are h...
[8 replies] Last: I think you're looking for this: void showbits(unsigned num) { fo... (by dhayden)
Program that gets factors
 
Alright guys so im trying to write a program that gets all the factors of a number.but the catch is for all of the not prime factors, i would like to break that...
[1 reply] : How about using std::vector; vector<vector<unsigned> > factoredNumber... (by dhayden)
Writing an assigment operator for a class...is this right?
 
I'm reading this book and I believe this to be an error, but considering the writer is obviously far more experienced than me I need someone who is also experie...
[1 reply] : when we call copy, shouldn't we use p as our destination and not elem... (by cire)
How to create a basic netflix movie queue?
 
Any suggestion how I should start with?? Welcome to the Netflix Movie Menu! 1. Display Movie Queue 2. Add Movie to Queue 3. Edit Movie in Queue 4. Remove...
[1 reply] : Do you have to use an array? Because a queue is a thing in C++ http:/... (by YFGHNG)
Libs Question
 
Hello, I am using code::blocks IDE and usually, when i compile lib(for example TinyXML) i get tinyxml.a(static lib file), and then i set in compile settings pat...
[1 reply] : [quote=man gcc]The only difference between using an -l option and spec... (by ne555)
by mi011
Need help, I'm very close!!
 
This is so far what I got for the output. The Exp is the right output for the test. So when I run my program through textBed it gives me the result 87 which I w...
[2 replies] Last: I got it Thank you so much!! (by mi011)
Looking for some games source code to study
 
I'm looking for some source codes of games for "begginers" , doesn't matter what libraries are used as long as the code is C/C++. When I say for begginers I mea...
[2 replies] Last: While I would recommend using Lazy Foo's tutorials for learning how to... (by Avilius)
by Bowski
Help: Program Breaking on Improper Input
 
Hello, my program keeps breaking when either too many letters are entered or too many spaces and I cannot seem to figure out why. I am guessing that having 3-4 ...
[1 reply] : Using the standard library (regular expressions http://en.cppreference... (by JLBorges)
by Kyle
Read file in, alphabetize and put into a new file
 
I have no idea where to really start on this program. I have to read in an existing file that is first name, last name, program, and number under that division....
[6 replies] Last: Im not too certain if your using c++ but the concept should be the sam... (by nameishi)
POW needs tweaking
 
I am writing a simple program to calculate base--exp. The problem I am having is that the function "forgets" the prior calculated value to that my answer is alw...
[7 replies] Last: Also,if you have any whitespace in the operator it throws an error: t... (by technologist)
Vector and Carray doubt
 
I have to two classes one is CArray mfc and vector c++ i have to change CArray implementation logic to vector c++ The function i have to changes is SetAt...
[5 replies] Last: thanks liuyang and fcantroro ..thanks for ur help ...appreciation for ... (by pawan21)
when two class are friend of each other
 
next class access property of previous class but previous class can't access member of next class when both class are friend of each other class previous { fri...
[2 replies] Last: Read this (Friend classes): http://www.cplusplus.com/doc/tutorial/inh... (by coder777)
can not find dangling pointer in linked list HELP
 
#include<iostream> #include<cmath> #include<string> using namespace std; struct listNode { string word; listNode*next; }; int main() { //just t...
[5 replies] Last: Yeah. Often in programming, the trick is to first think about the con... (by MikeyBoy)
November 2015 Pages: 1... 2021222324... 26
  Archived months: [oct2015] [dec2015]

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