Beginners - March 2019

Sorting a Vector of Objects Based on An Attribute
 
Please Note: This is from a homework assignment, however , it was due like 3-4 weeks ago. I'm solely doing it for the learning aspect. Also note that I checke...
[no replies]
by Jclow
String - Find and erase between two points?
 
Hi Guys, I'm trying to clean up an xml file that has unnecessary elements in it using CPP. e.g from the following line.. <xd ref="hgfhgfhj" invisible="true" ...
[2 replies] Last: I worked it out. Hope someone else finds this useful. void eraseAl... (by Jclow)
tic tac toe
 
How do I would reset the board if I did play again? also, how do I keep tracks of eins and losses? #include<iostream> using namespace std; char board ...
[8 replies] Last: Sorry 'imthekingbabyz' , I was in rush so I hadn't enough time for che... (by nuderobmonkey)
How to fill an array using for loop.
 
Hey, I came across a problem that I can't think of how to solve. I have n = 3 which is how many arrays there are and then I have k = 5 which tells me how many e...
[2 replies] Last: What you’re trying to achieve is commonly known as bidimensional arr... (by Enoizat)
Declaring Multidimensional Array of Unknown Size
 
Hello, So I have a header file for a class where I want to privately declare a 2D array of an object type Piece (with undefined # rows and columns until user t...
[7 replies] Last: Thank you very much! That makes sense. Also, I will definitely look th... (by AnnieBonanza)
Split doubly linked list
 
I have got a doubly linked list and pointer to the node How can I write splitAfter and splitBefore functions Functions have to include border cases These fu...
[8 replies] Last: Give List.head and List.tail initial values. The ListXYZ() functions ... (by dhayden)
Printing best number from for loop
 
Hey all, hope I won't need to translate the whole code but what I need to do is to print which is the best number from the loop 45th line. I have a text file an...
[1 reply] : Found issue Apparently, it's 0 because I started the loop from 0. So ... (by DdavidDLT)
Printing out an array for a dice roller
 
Hello, I am having trouble coding this program that requires selecting a certain function from a menu and then entering the amount of die you want to roll. In ...
[4 replies] Last: Ty, nice to know, i'm new on c++ too... (by SophiaCristina)
by Vetzo
reference function const
 
Hello Forum, See the following code: class A { public: int intValue = 3; // int & rValue1() const { return intValue; } // Not allowed. int & r...
[2 replies] Last: Ok, thanks for the reply. (by Vetzo)
For loop generating Run Time Error because of string condition
 
Hello, I am trying to write a program in which I will be using a string to add or subtract a mathematical equation. That is, a mathematical equation will be inp...
[3 replies] Last: Now, I changed a little bit of code.. And declared another int "l" fo... (by redfury)
writing a program for loans
 
For context I have to Write a program that will take three inputs: the amount the consumer needs to receive, the interest rate, and the duration of the loan in ...
[2 replies] Last: Thank you very much! It now seems to work just fine now. I guess I pre... (by Deadweight77)
Program for Reading Employees' Pay Info From a File
 
So my assignment is the read a list of employee's pay information from a file, and to output each employee's name and weekly pay, then the gross pay for the com...
[4 replies] Last: First of all thank you so much for the help, this is more than I could... (by acscicplusplus)
by yup2
Using a class variable with another class
 
Im stuck on using assigning a new variable with the value of another variable which is declared in a different class. For instance, the two values that I would ...
[2 replies] Last: Much appreciated!! Thank you! (by yup2)
do...while loop requires me two input twice for it to work
 
Hello everyone. So basically I was having a lot of problems with this loop. This is a program that should help me choose the right decision when playing blackja...
[3 replies] Last: Oh I never thought of doing things that way! My program works now but ... (by GBCmelly)
For loop not working properly in a linear search?
 
I seem to be having a problem with a for loop, in creating a linear search of a .txt file. What I am aiming to do is to have the output "Found @ literal pos...
[2 replies] Last: Just like @lastchance said... You are not getting information from the... (by SophiaCristina)
by gjur99
array to function
 
hello fellow tech people! Im having some trouble with passing an array to a function to do some operation(s). My code runs and does what is asked to do. But...
[8 replies] Last: Do the months have realistic rain values before you call the max_eleme... (by keskiverto)
A better way to sort this char pair?
 
Hello once again :) So currently I'm trying to sort a pair that takes a int and a char. And after it takes those values it runs a "strange type of bubblesor...
[4 replies] Last: Thanks for both your imputs guys. I actually managed to make @keskive... (by FreeSocks)
[help].c file and .cpp file
 
https://repl.it/@kakaducsy/WorthyLeafyBlog I can't call c function on cpp project
[3 replies] Last: What is your compiler? Visual Studio 2017 digests your code without a... (by George P)
by Bopaki
Starting with linked lists
 
I want help in writting the code to display this list on the screen #include<iostream> #include<cassert> using namespace std; struct nodeType { ...
[6 replies] Last: The pointer-to-pointer trick makes deleting items really easy too. Th... (by dhayden)
Need directions to current information on arrow key input
 
Hi, Normally, I would ask for specific help, but I've been googling the topic of accepting arrow keys for input in a compiler based program for 2 hours, and ...
[9 replies] Last: @jjordan33 I don't know anything about the Mac, (If that's what you'r... (by whitenite1)
March 2019 Pages: 123... 25
  Archived months: [feb2019] [apr2019]

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