General C++ Programming - April 2014 (Page 8)

Help designing a struct
 
We need to design a game for class and my group is storing all of the character's attributes in a struct. Below is the code that we have and visual studio gives...
[1 reply] : You have a player called name, and a string called name. You can't hav... (by Zhuge)
Container of a hierarchy of objects
 
How do we design a container of objects all of which belong to some subclass which directly/indirectly inherits from a given parent class? Moreover, I would lik...
[8 replies] Last: If you need to be able to identify every single class in hierarchy, yo... (by MiiNiPaa)
Tree
 
How would I go about creating a tree like structure using linked lists, I am thinking of making a rubix cube solver program, what I want to do create nodes that...
[2 replies] Last: Basic Linked List A linked list is a structure with a pointer to an... (by Duthomhas)
Chapter 14 Programming Projects 5
 
Give the definition of two classes, Patient and Billing , whose objects are records for a clinic. Patient will be derived from the class Person given in Program...
[1 reply] : Please note, that this is not a homework site. We won't do your homewo... (by MiiNiPaa)
Help with Homework
 
This is the homework assignment 1. Write a program that uses the class SalariedEmployee given in Display 14.4 . Your program is to define a derived class ca...
[2 replies] Last: #include <iostream> #include <string> using namespace std; class Emp... (by bclemon)
cant get GetOpenFIleName() to return string.
 
Below is my code. hEditOPenSiteFile is global and is initialized in WM_CREATE, below is the code i cant get to work. case IDC_BUTTON_OPENSITE: { OPENFILE...
[13 replies] Last: I got it to work, i had to change the char to a WCHAR, these UNICODE ... (by Disch)
std::match_results with std::basic_string (regex)
 
I am trying to construct a regex matcher for a basic string so that I have a generalized regex matching function for any string type. I am getting a syntax err...
[2 replies] Last: Perfect! Thanks for the quick reply and the extra note. (by DavidTroendle)
How does (PC-)Adlib percussion work?
 
Anyone knows how Adlib percussion works (compared to the normal sound channels)? Souce info looked at: http://soundshock.se/phpBB2/viewtopic.php?t=21 The byte...
[no replies]
Looking for a compiler
 
Hey guys, I'm looking for a compiler because currently dev c++ has not implemented std::function!
[4 replies] Last: This thread has several links http://www.cplusplus.com/forum/general/1... (by JLBorges)
by moshoo
M@gic squ@res
 
Hi, I'm working on c++ magic squares project to generate a random magic squares. i already did the project but he said that this code only generate the same n...
[2 replies] Last: Props actually on doing a very good job. I don't know enough about g... (by Duthomhas)
by CRooky
comma program
 
Given the code snippet of a calling function -> Code the printWithComma () function starting here. Two Sample Runs Enter a number with up to 6 digits: 12...
[2 replies] Last: Read this: http://www.cplusplus.com/reference/ios/fixed/ you may find... (by coder777)
getline skipping first time
 
why does this happen that if i use string ans; for(int i=1; i<3; i++) { cout << "enter an option" << endl; getline(cin,ans) } in a loop it always skips the...
[3 replies] Last: You probably used cin >> ... (which leaves then end of line in the s... (by coder777)
Bool Statement Issue
 
Hello, I have made a lot of good progress here, but I can't seem to get my simple bool statement to work. The problem being solved is irrelevant at this poin...
[3 replies] Last: lol. Xismn, I appreciate you taking the time to find that for me. I fe... (by Bluebaron)
by CRooky
perimeter program 2 versions
 
Ok guys...so I have 2 versions of this perimeter program where I'm trying to find I believe the value of c(squared) There 1st Version looks like this. Given ...
[1 reply] : The first makes no sense: // call: calcPerimeter & then calc sideC pe... (by keskiverto)
by vinnyo
HW question
 
This is the question: http://gyazo.com/b2ef477a7edade0fdd3a40ac084cd441 Now I have the binary numbers printed out in my code, but I don't know how I can cov...
[1 reply] : how I can covert them into to decimal i variable should contain dec... (by MiiNiPaa)
vector with 100 ints
 
Write a program to create a vector of 100 ints. Fill it with 100 small, random integers between 1 and 100, inclusive, by using an appropriate call from the ...
[8 replies] Last: i have solve it.. in fact the 2nd for loop was nt necessary... thks gu... (by krisapp)
Searching a MultiMap with Regex
 
Hello all, I have a multimap with over 300k entries defined like so: std::multimap<std::string, std::string> filedata; Using the following code and std::...
[2 replies] Last: Hi kempofighter , I meant getting the work done fast (chrono). Thank... (by closed account 18hRX9L8)
by CRooky
T Minus loops
 
(while) T minus 10 and counting T minus 9 and counting T minus 8 and counting T minus 7 and counting T minus 6 and counting T minus 5 and counting T...
[4 replies] Last: You can do what you just had, though slightly different (as @ne555 sug... (by TwilightSpectre)
SSE Matrix Multiplication Error
 
Hello all, I have been using SSE/ SIMD Matrix multiplication approaches and I persistently get this error: An unhandled exception of type 'System.AccessViola...
[3 replies] Last: You could represent the matrix as a struct or class , and then dyna... (by TwilightSpectre)
Big Integer Class using Dynamic Arrays
 
I have become overwhelmed an frustrated at these current operator overloads! Currently I still can not get my +,* or istream operators working at all! I c...
[1 reply] : Example: int main() { int size; std::cin >> size; int *array... (by KyiannaJones)
April 2014 Pages: 1... 678910... 41
  Archived months: [mar2014] [may2014]

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