General C++ Programming - October 2019 (Page 7)

read data functions
 
I have an assignment to create a C++ program to use bubble sort to arrange the names in my text file by last name. I'm having trouble setting my read data funct...
[1 reply] : the first thing to do when getting help is to at least give a program ... (by jonnin)
How do I implement a random value in a method using pointers..
 
I'm working with classes, methods, objects. The .h & .cpp file. In my h file i have dynamic attributes called. class AtkBlob { private: int *hp, *attack, def...
[2 replies] Last: @caiitys, A couple of things unrelated to your question. First, your... (by doug4)
Commodore 64 and Tilt Five AR
 
Rob and Jason are joined by Jeri Ellsworth the CEO of Tilt Five. Jeri and Jason first geek out about the Commodore 64 with Jeri telling her story of building th...
[1 reply] : Nah, that's not spam. It might have some comercial stuff, but why not.... (by coder777)
How do I switch program to use a txt file??
 
This is currently the program I have. I need to modify it so that i can read from a blank txt file and display the same information. #include <iostream> #incl...
[3 replies] Last: thanks jonnin for the advice i will give it a shot (by W1743625)
Infinite loop by input validation
 
I tested out my program and when I input a value less than 3 and higher than 20 it gives me the error message intended but afterwards when I type in a character...
[1 reply] : Separate your input and your drawing by using functions. Otherwise you... (by lastchance)
Creating a toolbar with icons
 
Hi, first post. I'm using Visual Studio for my IDE. I want to create a toolbar with clickable icons to select different tools [similar to Microsoft Paint]. ...
[7 replies] Last: If you do get a copy of Petzold's Programming Windows Fifth Edition (h... (by George P)
Linked List HELP!!
 
Hi! I'm making a linked list where it contains 6 elements and wherein if input a number, starting from the first element, going to the element according to the ...
[1 reply] : Also here -> http://www.cplusplus.com/forum/beginner/263955/ (by salem c)
Cant understand error
 
I dont know why i get this error. Can someone explain why i get this error for this constructor and a way to fix this? Out-of-line definition of 'VendingMachin...
[2 replies] Last: PLEASE USE CODE TAGS. The constructor you declare in the header file ... (by lastchance)
Need help making input validation work
 
Hi, I was wondering if anyone could help me out in making any number greater than 20 and less than 3 give an error message that redirects the user to inputting ...
[2 replies] Last: To see if there were more replies that could help me solve this proble... (by Depressed)
how concatenate strings
 
i have 2 strings: string1= "hello world"; string2 = "hello"; imagine that i need add the string2 in middle(yes i know the position) of string1... how ca...
[5 replies] Last: thank you so much for all... it's working like i need (by Cambalinho)
how print in same column?
 
how can i print 3 or more values, in same column using cout? heres my actual code: cout <<"\n" << "show tokens\n"; for(unsigned int i=0;i<Tokens.siz...
[15 replies] Last: Turbo C++ was designed to work on an entirely different system. It was... (by Duthomhas)
by kitfox
How to adapt a lookup to use smart pointers?
 
I’m trying to implement an index that I want to use to handle the nodes I encounter as I parse an xml document. I’ve been reading about smart pointers and ...
[6 replies] Last: @JLBorges Isn't kind of fun when people try to turn C++ syntax into C#... (by malibor)
Need Help on making a rectangle with user input using two differenct characters
 
Hi, I have this one assignment I am working on and I am a bit stuck here I have to make a rectangle do this with user input: Side size = 1 +-+ | | | | ...
[1 reply] : Asked and answered here -> http://www.cplusplus.com/forum/beginner/263... (by salem c)
I can't get the loops right. It does it a different way every time & i need to add a third loop if they input invalid miles.
 
#include <iostream> using namespace std; double computeVehicleCost(double overageRate, int freeMiles, double dailyFee, int estimatedMiles); int main() {...
[1 reply] : help us help you. explain exactly what you need. use code tags. yo... (by jonnin)
Calculating the area of a triangle
 
If somebody could give this a look over to help me fix my issue.. The program just finishes after inputting one value and I don't know where I'm going wrong. A...
[3 replies] Last: Here is a one line method to calculate area of triangle from my projec... (by malibor)
Can we change the value content of a enum
 
Can we change the value content of a enum afterward? enum Val : int { a, b, c } //... Val a = (Val)3 ; how do we do it ? to change a from 0 to 3, o...
[1 reply] : // each enumerator like RED or GREEN is a named constant; // its valu... (by JLBorges)
Using setprecision() with fout
 
Hello, I have a text file with three values. 2.5 7.6 -3 I am trying to output the values in another text file, with a decimal point of 5 places. I have don...
[2 replies] Last: @jlb That was it! I added fixed and it did the output correctly. Tha... (by Ford1400)
Error with switch statement
 
So I'm writing this code that takes a phrase and translates it into Pig Latin and will do that until the user decides to stop. Im using a switch statement for t...
[5 replies] Last: Thank you! (by Aneiron)
question
 
Hello, I have a firmware i would like to get some help to edit.. its for a printer could anyone help me?
[1 reply] : Probably not. But if you get stuck somewhere you can ask a specific ... (by zapshe)
This is as far as I can make it. Can anyone tell me exactly where I'm going wrong.
 
This is supposed to be a car rental program that states what the vehicle rental cost is and the vehicles that are cheaper. I'm. Not getting g the right numbers...
[3 replies] Last: Thank you so much! I'm a beginner and we are just learning functions. ... (by poobear)
October 2019 Pages: 1... 5678910
  Archived months: [sep2019] [nov2019]

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