General C++ Programming - February 2018 (Page 6)

Classes inside classes and Monostates, oh my!
 
Hello people of the interwebs. I have two questions to ask! It seems when I'm tooling along in a project, which happens to be quite large I find myself tendi...
[3 replies] Last: JLBorges, maybe I misunderstand the OP's question, but I feel the use ... (by Ganado)
Help understanding some code
 
Hi I'm doing some research into brute force password cracking for my university course and my tutor suggested using these lines of code, and I was wondering if ...
[3 replies] Last: the ascii table is annoying for that. I would just load up a (vector,... (by jonnin)
Error when trying to print out values from vectors
 
Hi , just wanted to ask.. because i was trying to access some data from my vector container. i was using the code below to access it for (std::vector<string...
[14 replies] Last: Thank you very much everyone. (by paulpv278)
Converting XMacro into template in C++03
 
I have an XMacro which I use to create a sort-of object database surrogate (kind of). Basically, each entry of the XMacro is processed and then added to the dat...
[no replies]
by roger3
Letter count with reference variables! help
 
My code docent work! its spouse to return the most frequent appearing letter with the total occurrences. I get some other letters! and also, how can I use refer...
[1 reply] : Can use containers for such things. Even a plain array is ok #inclu... (by elohssa)
every time i build it fails? What am I doing wrong
 
//Zipoids is a level of currency used by obscure gamers. These gamers must pay tax in the following manner 1. 0 - 5,000 zipoids – 0% tax 2. 5001 - 10,000 zipo...
[5 replies] Last: Thanks a bunch to those who helped and to those with rude snarky remar... (by closed account zCR4E3v7)
Force the user to enter ONLY an integer
 
Trying to figure out how to force the user to enter an integer ONLY when prompted after choosing either 1 or 2 from the menu. Program code below. int main() {...
[2 replies] Last: There are two things that must be understood about input to process th... (by Duthomhas)
C++ practice problem help
 
POSTNET (Postal Numeric Encoding Technique) is a barcode system that was used until 2013 by the United States Postal Service to assist in directing mail. The zi...
[2 replies] Last: the sample is this http://prntscr.com/ifdik7 I just didn't know how to... (by Boldjon)
I need a bit of help with some C++
 
Here is what I am supposed to do. Create a program that implements text based characters and inventory items. Allow the user to view the inventory of the char...
[4 replies] Last: Here is my final code #include <iostream> #include <iomanip> #inclu... (by CrystalPlu)
C++ Sequence class error
 
When I try to run the program, I eventually get a message saying "assertion failed" so I figure there is a problem with attach(), is_item(), and/or advance() bu...
[1 reply] : The assert that is triggered is on line 106, inside the advance() func... (by Peter87)
sum of fraction
 
I know to code for the sum of numbers but does anyone have a code to add fractions.
[4 replies] Last: Input a,b,c,d (however you want). (a/b) + (c/d) = (ad+bc)/(bd) Work ... (by lastchance)
Adding Elements at beginning of array
 
I need help! I wanna know how to add new more elements to my existing array. I'm using the vector class but i no longer want to add elements at the end of th...
[8 replies] Last: //demonstrates array class with high-level interface Apart from find... (by keskiverto)
by moussa
Function call
 
How to call hh() by overloaded function call operator in the below case? like in normal function call it's A a; a(), here it's supposed to return pointer to ...
[2 replies] Last: Thanks Sergey! (by moussa)
PugiXML Parsing
 
Hey all, I am new to the forums! Anyways, I had a few questions regarding how to properly parse XML using PuigXML on C++. I am developing a game, and I have som...
[1 reply] : Duplicate of http://www.cplusplus.com/forum/beginner/230654/ . Please... (by MikeyBoy)
Eclipse can't find includes, looking in the wrong place
 
Hi, I want to ask a question about my recent attempt to configure OpenCV with Eclipse. After configuring, generating and installing a MinGW-based makefile open...
[5 replies] Last: The problem may be that you are trying to use a relative path. It woul... (by sm2345110)
How to print characters in rows and columns?
 
I need to print out characters in 6 rows and 5 columns, i got this code so far, when i run it it only print out the char in one column. void printFile(){ ...
[1 reply] : you can use http://www.cplusplus.com/reference/iomanip/setw/ or you ca... (by SamuelAdams)
If a given task being performed by a function involves one object, then that function should normally be a ____ function
 
If a given task being performed by a function involves one object, then that function should normally be a ____ function What type of function is this in...
[2 replies] Last: I think you're right with Unary! We have no choices, but this sounds c... (by zeblikin)
Program I'm writing
 
Can someone look through this and tell me why amount isn't displaying anything in the "Total" file? I can't figure it out. Trying to refresh myself on C++ right...
[2 replies] Last: I should clarify, it does show something, but only "Total money spent"... (by ComputerG33k)
by Kalcor
Difference between struct* and struct*&
 
Having a linked list for example in the form of a struct. Why do we send the head of the linked list to the function parameter in the form of *& and not just * ...
[3 replies] Last: in a lot of code, * is sufficient. You only need the & if you plan to... (by jonnin)
Checking tic tac toe winner on a board NxN (1D array)
 
So, previously I made a tic tac toe game with a normal 3x3 board. My teacher assigned us to make a tic tac toe game with a board size of 4x6 to 12x15 and in add...
[3 replies] Last: access of a 1-d array as if 2-d is simply array[desired_row*numcols+d... (by jonnin)
February 2018 Pages: 1... 45678... 11
  Archived months: [jan2018] [mar2018]

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