Beginners - May 2021 (Page 5)

string to int, removing whitespace
 
I am doing questions on hackerrank, and have been asked to make a loop, which I have been able to do easy enough. But the starter code is quite unfamiliar to me...
[11 replies] Last: Others books I suggest are: 'Think like a programmer' by Spraul 'H... (by seeplus)
"No viable overloaded '=' "
 
Im having trouble trying to remove this whole array member But everytime I try to remove it and move the others I get the error. Lets just Say im trying to remo...
[3 replies] Last: What if there are more than one entry with same name? What if there a... (by keskiverto)
Virtual Methods in C++
 
Hello, I have the following input: 3 lion 100 35 tiger 100 23 tiger 120 40 and I expected output to be: lion 3500 tiger 123 tiger 160 But the ou...
[3 replies] Last: Using polymorphism and dynamic memory, possibly: #include <iostream... (by seeplus)
by L67GS
Advice on a string problem please?
 
I don't necessarily need help, just advice on the approach to take for a function I'm writing. I'm like a year in to C++ so please don't crucify me. Here's the...
[15 replies] Last: :) (by againtry)
Help with OOP
 
I am wondering how to get my class to work with the main that I have right here. The error that I am getting is that there is no matching function call for th...
[3 replies] Last: To expand on what others have said, when you talk about: function ca... (by MikeyBoy)
by scaar
How to declare and initialize an objects inside another object
 
Hello to everyone, I have two classes, and I need to define one of them into the other. I did something like the code below, but it doesn't work, and I don't u...
[5 replies] Last: Ok, thank you for the explanation. (by scaar)
C++ sqlite3 function pointer (1,2)
 
I tried every solution I know of, but it still give C3867 error for the way I used "callback" inside "checkexists" function. It seems I should refer to callback...
[21 replies] Last: So I made some changes as below and though it all works like charm no... (by mbozzi)
Introduction and how to set up a project without an IDE
 
So I'm just getting into C++ and have a few questions. But, first, I believe a (hopefully brief) introduction is in order. I'm no stranger to programming in...
[7 replies] Last: keskiverto: Just what I needed. Thank you! jonnin: Unfortunately I'm ... (by etech58761)
String Dates
 
Hi, I need help with 2 (mostly the 2nd question) Questions: 1) I have to program a code where you enter n number of sales dates on the form dd-mm-yyyy. These da...
[1 reply] : For 1), perhaps consider: #include <iostream> #include <fstream> #i... (by seeplus)
by emcp
How to approach multithreading asynchronous functions
 
Hi and thanks for reading, I am practicing C++ to further get better at writing multi-threaded capable programs.. specifically I am now attempting to solve the...
[9 replies] Last: I did a side by side of a simple program and the python was 10 times s... (by jonnin)
Writing a program to read an input file
 
You have to write a program to read an input file character by character to help Peter solve the following activity in his activity book. The paragraph below is...
[17 replies] Last: my understanding is that most of the time, unless prevented by somethi... (by jonnin)
Find the harmonic mean
 
Hi! I'm having trouble with my code. We were tasked to find the harmonic mean. Harmonic Mean = n / 1/x1 + 1/x2 ... The n will be the user's input. The x1...
[3 replies] Last: The std::valarray is rather unique type in standard library; it has mu... (by keskiverto)
by siid14
a value of type "int *" cannot be assigned to an entity of type "int"
 
Trying to do the following task: Write a function that accepts an int array and the array size as arguments. The function should dynamically create a new array ...
[4 replies] Last: Thank you guys, it's really helpful (by siid14)
How to finish Hangman code?
 
I am basically creating a Hangman game using object oriented programming and some parts of it was confusing with protected class and inheritance. My Words class...
[3 replies] Last: My Words class is perfect and has been tested and works just fine Al... (by dhayden)
how to execute file related cpp program
 
Hello everyone, I am trying to execute the file operation program in COODEBLOCKS editor. The program executes. The search function and display functions are go...
[2 replies] Last: Hello newbeeindia, In addition to what salem c has said do not use "... (by Handy Andy)
In need of help with my code
 
For some reason my while loop is not working I'd like some help #include <iostream> #include <string> #include <sstream> using namespace std; struct emp...
[3 replies] Last: Yeah I did what u said and it worked im grateful man (by CloudArki)
I need help with my code
 
Write your question here. #include<iostream> #include<conio.h> using namespace std; class String { public: char a ,b ; int compare(char a ,...
[8 replies] Last: trying to clean up names is a lost cause lol. Connor McCloud //will y... (by jonnin)
How to convert this C++ code to python code?
 
I have a C++ code here which inputs some attributes for n objects of a class named stock. int counter=0; Stock* stock = new Stock ; //creating n st...
[3 replies] Last: Not very good on object-oriented python, but you could try class Stoc... (by lastchance)
I NEED HELP!
 
Write your question here. Hello, im a student and im going to college this year i started c++ at school and my school will finish in 1 month, i didn't unders...
[13 replies] Last: To add on to what Ganado has said..... You might have people who will... (by deleted account xyzzy)
Firmware flow chart for control system
 
Hi All, I am in the process of writing firmware for an event driven IoT device and find the visual representation of a flow chart a great way to do see how m...
[2 replies] Last: Thank you for your reply, those two links were also my first finds and... (by DylanAus)
May 2021 Pages: 1... 34567... 10
  Archived months: [apr2021] [jun2021]

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