General C++ Programming - November 2012 (Page 17)

classes and arrays.
 
I have to create a header file and immplement a class called Quiz that manages an array of up to 25 Question objects. It keeps track of the correc tand incorrec...
[2 replies] Last: What error are you getting? You need to help us to help you! (by MikeyBoy)
I need help regarding fraction to string
 
double b=0.34;int c=0; for(;b>0;b*=10,c=b){ cout<<b<<"-"<<c<<"="<<b-c<<endl; b=b-c; } It is for converting a fraction part of a number to a string....
[17 replies] Last: Thank you for explaining. I think this is all the information needed. (by closed account 9y8C5Di1)
Need immediate help on storing a pointer in a char array
 
Following is the pseudo code I have created. #include<iostream> using namespace std; class sample { public: int value; unsigned char p; }; ...
[2 replies] Last: memcpy(time.arr,&ptr,sizeof(ptr)); should work (by theranga)
Applying random numbers to array
 
Hi! I'm having some trouble with creating an array with random numbers... How am I to write it? #include <iostream> #include <cstdlib> #include <time.h> #inc...
[8 replies] Last: however you're right that it should be a 2D array if you wanted to sto... (by theranga)
by kampi
How to get a handle to a JobObject without knowing its name, or how to get a JobObject's name?
 
Hi! My application is running in a job. I want to get a Handle to this Jobobject using OpenJobObject so i can later use this handle. The problem is, that i d...
[1 reply] : This is Windows-specific stuff, so you should post in the Windows Prog... (by MikeyBoy)
Template operator in template class
 
Hi all, I've looked around to try and understand this problem, but I can't figure it out; a little help would be greatly appreciated! I'm trying to define a ...
[4 replies] Last: Thank you so much again for taking the time to give me these explanati... (by Terminux)
by Ryuuji
array of typedef struct declared inside class
 
Hi everyone! I'm encountering problem about typedef struct. The case was i declared a struct inside a class like this: class Myclass { private: typ...
[3 replies] Last: typedef here generates an error. In general, typedef creates a type a... (by Cubbi)
LNK2019 error
 
Now I know what this error means but I am having the strangest problem with it and someone else on here might have had it before and can see what I can not. ...
[3 replies] Last: Thanks for your help guys, what I had done was defined one of the func... (by closed account GL1Rko23)
Recursive Brute Force String Generation
 
[Yes, I've looked at all the other examples!] Trying to make a non-encrypted brute force for the fun of it. Haven't been coding for awhile as I took an interest...
[no replies]
Extraction operator >>
 
I am working on how to extract the real and imaginary component of a complex number (example 67 - 23i). My professor gave us a clue and said used the extraction...
[3 replies] Last: I ... was surprise to see that they have these many choices And ther... (by andywestken)
Calling base class's method from Main
 
Hi, I have this base class: Class Base { public: virtual uchar ReadByte(uchar addr) {//read value at base_addr + addr}; private: uchar b...
[no replies]
by Petq
Caesar Cipher Using Voids
 
I'm very new to C++, and I need some help. I'm currently having trouble trying to write a Caesar cipher in C++. So far, I'm able to get it to read characters fr...
[1 reply] : What you display as "Most frequent letter" is in fact your shift. (by toum)
Manipulating 2D arrays and C-string?
 
I'm writing a program that output a string to the string a certain way. The string: Once upon a time The output has to be: Once upon a time When it rea...
[1 reply] : Without the complete code it's hard to tell. Why not simply replace e... (by toum)
Problem with queues with a parking garage
 
Okay so I am having trouble with my depart function. When I output I keep getting 0 for the license plate number and the count for each time a car moves is not ...
[1 reply] : The problem is that your queue and your depart function don't do what ... (by toum)
Strange String problem
 
I've been programming in C++ for about a year now, and I've run into a strange issue. I've found a workaround for the issue, but I want to understand what caus...
[10 replies] Last: Don't quote me on this, but I think the performance of stringstream is... (by ResidentBiscuit)
by Owe
URGENT HELP
 
I am doing a project for my class, and these are the requirements of the project. ----------------------------- 1. Link List 2. Templates 3. Structs 4. Dy...
[2 replies] Last: Double post: http://www.cplusplus.com/forum/general/85452/ (by cnoeval)
Program crashes - probably on type conversion
 
Hey everybody! My program crashes... and I have no real Idea why. The basic task here is to implement a program which converts a infix-notation to a postfix-not...
[1 reply] : The problem was not the type conversion. Since I did not pop the uppe... (by redpaperlantern)
by Balrog
Visibility of objects across files
 
I've been stuck for some time on an error regarding the visibility of objects declared in one file in other files in my project. I'm using VCE 2010, and here ar...
[2 replies] Last: You also don't need to have header guards in the source files. (by Peter87)
OpenCV faceRecognizer predited label
 
Hello, I am using the facerecognizer EigenFaceRecognizer. And I am using these instructions to get the label prediction: Mat img = imread("person1/3.jp...
[no replies]
Construction leak ??
 
Hi All, Dumb C++ question, I wanted your view on Suppose class A { public: // constructor // copy constructor A(const A& a) { this->x = a.x; this...
[1 reply] : he can virtually copy all the elements from a given object of A into ... (by Cubbi)
November 2012 Pages: 1... 1516171819... 51
  Archived months: [oct2012] [dec2012]

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