Beginners - November 2021 (Page 6)

Exercices of C++ Book.
 
Hello there!. Could not compile with error: root@supernova-MacBookPro:/home/supernova/Desktop/Impetus/Prog/Nov# g++ GradeBook.cpp -o GradeBookcpp /usr/bin/ld:...
[1 reply] : To compile a c/c++ program, you need a main() function. int main() ... (by seeplus)
by dhinze
"blank" must return a value?
 
I am creating a story based program but having an error? When I compile I am getting a "middle" must return a value error. How can I fix this? main.cpp file ...
[1 reply] : function middle, of type string, must return a string. or, you can ma... (by jonnin)
Override specifier
 
Hi can you help me to fix the error in Invoice class .h - " dt Unknown override specifier" I think its something in Invoice.h file when i declarate "Date dt",...
[1 reply] : One thing I see is that your Invoice.h #includes Date.h, but your Date... (by Ganado)
getpid () pit_t
 
This a small progam to print the process ID I got this result The process id: 165949 which process is this ? As I know is the getpid() is to return th...
[3 replies] Last: I dunno where you're getting the idea of child within the file itself,... (by salem c)
C++ structure program that returns student information from file
 
I have an unfinished program for homework, the main issue is I am not sure how to make a function that returns the average of an array of test scores and homewo...
[5 replies] Last: 0,1,2,3 how many numbers do you see up there, 3 or 4? the array size i... (by jonnin)
Map with classes
 
Hello, I don't know how to output the map in class Running code] class Athlete { std::string name, country; int year; public: Athlete...
[14 replies] Last: https://kidneystones.uchicago.edu/how-to-eat-a-high-calcium-low-sodium... (by againtry)
by BigTim
Multiple variables in one equation
 
Ok so I'm working with parrel arrays and I'm needing to calculate how many points are needed for each grade with the numberOfPoints array while doing it in one ...
[8 replies] Last: Thank you for all your help on this! it had me kinda confused but I th... (by BigTim)
by Harlee
Good old hangman
 
Hello and thank you for your time to possibly help me with this. I have scoured the internet and books and forums but this version of Hangman seems to be differ...
[4 replies] Last: you don't HAVE to do anything any particular way. a little extra proc... (by jonnin)
C++ Menu using loops
 
Hello all. I'm having a hard time with my menu, as we have only just begun to learn loops. I tried to find what I specifically needed before I decided to create...
[6 replies] Last: You shouldn't have a loop at line 32 at all. After all, you don't chan... (by dhayden)
Converting a string to an integer
 
Trying to convert a username into how many characters it is (ie the name Bob = 3) to do further calculation further down to multiply by age. I feel Im so close ...
[8 replies] Last: You don’t need to erase anything, just count the things that matte... (by Duthomhas)
by tapni
Strings C++ (1,2)
 
There are two strings with dynamic size. It's needed to write a function which returns true if these strings have at least one same character and false if they ...
[26 replies] Last: @ Duthomhas Ah, I keep forgetting about RVO. What I was thinking w... (by TheIdeasMan)
by MeiMei
Please help me (Shortest path - recursion)
 
The question ask me to search for the shortest path to reach the target point. The fully runnable code and a map.txt with test case are in the comment. HW requ...
[14 replies] Last: @dhayden It definitely took me more than one try as well. Interesting... (by mbozzi)
c++ HW Program that creates a linked list
 
Prompt: Problem 3: Linked List (35 Points) Using the Linked List program we did in class (or video) as an example write a program that creates another linked l...
[2 replies] Last: Lines 52 and 53. You overwrite the first & last name of the first reco... (by dhayden)
by ICantC
Reading text from a file
 
I have a text adventure game in ANSI C that is trying to load a text file containing the area description from a .txt file into a heap allocated buffer, which i...
[11 replies] Last: also, consider testing small parts at a time. first, hard code a coup... (by jonnin)
Header and object oriented programming
 
Hello all! I am quite new to C++ and very new to object oriented programming and setting up headers and specific classes. I am try to figure out the Area and Pe...
[7 replies] Last: Maybe: #include <iostream> class Square { public: Square() {}; S... (by seeplus)
Print map - help
 
I dont get it how can i print this map to look like Invoice with stock object in it I have to make class Invoice witch must contain map with key value clas...
[4 replies] Last: Ops, im sorry my bad It does not accept [stock, val] parameters (by Leo2505)
trying to make a simple console text editor
 
hi, i'm new here, and i have been trying to make a text editor on c++ since yesterday, because i'm having an issue: when i open the file, the contents of it ar...
[18 replies] Last: yeah. (by retro 64K)
by jeyc
how to access and use user input variables into another function
 
Hello, I'm new to c++ I'm trying to create a reservation system for my school project. My question is how do I can access variables from other functions because...
[3 replies] Last: your code is a trainwreck, so I ignored it to give you a simple exampl... (by jonnin)
error: 'else' without a previous 'if'
 
error: 'else' without a previous 'if' even if there is a if statement, please tell me how to fix it :')) #include <iostream> using namespace std; int main(...
[1 reply] : the code you posted compiles. however, the else is all wrong. -> el... (by jonnin)
Please help me modify this program, assignment is due tonight at midnight
 
C++ Modify existing program Step 1 2Add to code that after each hand of the game, ask the user if he/she wants to play another hand or not. If a ‘y’ i...
[6 replies] Last: at midnight UTC or Zulu time? (We don't want to help too early.)... (by keskiverto)
November 2021 Pages: 1... 45678
  Archived months: [oct2021] [dec2021]

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