Beginners - September 2021

by jo8et
Passing constant pointers to functions
 
Hi all, I have two member function definitions below, I am having trouble as one accepts a non const pointer but const string, and the other accepts a non const...
[3 replies] Last: Thank you, it is now solved! There was a typo in the header file... (by jo8et)
As someone who never learned a coding language before how do you recommend learning C++? (1,2)
 
Is it possible to learn a low-level machine language like C++ as a first language? Been going at it for the first few weeks mainly from lectures from my profes...
[27 replies] Last: You've had some good advice in these posts, I'll try to avoid repeatin... (by Niccolo)
by jabeh
Classes and Objects
 
What is the purpose of using Classes and object in codes? as a beginner what do i have to do in order to be an experts in coding any tips?
[3 replies] Last: Keep coding - solve coding problems. Codingame.com (by zapshe)
'Class' was not declared in this scope
 
Hi, so i've got this error when i compile my program and i don't understand why ...In function ‘void make_db_corso()’: ...error: ‘Corso’ was not ...
[6 replies] Last: Nevermind, i've searching for the dependency with other class but in f... (by travelskid)
Reading in one character at a time
 
Hi! We have to find out that in chemical formulas how can we read and the use of binary search for searching particular elements and get correct atomic weig...
[16 replies] Last: @ salem c None of the solutions presented here are usable by the OP f... (by Duthomhas)
Building A Online Compiler
 
Hey everyone, I’m a beginner programmer, but I have an idea for a long-term future project I want to start. I want to design an online compiler ide for c++...
[4 replies] Last: OP disguising spam in text again. Everyone of their posts pushes the s... (by salem c)
by jo8et
Serial Library class method
 
Hi all, I am using the Serialib serial library, but am having trouble understanding how to use the below class method. More specifically, the first method ar...
[4 replies] Last: glad you got it working. if that readchar is max number to read, it ... (by jonnin)
Ending a program with while loop
 
Hi I am struggling to make this program repeat until the user types -1. Does anyone know how I can do it with a while loop and break when the user enters -1 bec...
[2 replies] Last: #include <iostream> bool isPerfect(int number) { int sum {}; for... (by seeplus)
valgrind
 
What will valgrind --leak-check=yes complain about in this program? Anyone describe the steps to carryout the procedure to use valgrind to find memory leaks...
[4 replies] Last: > Anyone describe the steps to carryout the procedure to use valgrind ... (by JLBorges)
Autofilling a variable in C++
 
Hi! I want to learn c++ and want to use binary numbers for my project. From Decimal to binary translation I have already a function, with ceros I want auto ...
[3 replies] Last: #include <iostream> #include <string> using namespace std; string bi... (by lastchance)
blocks 17.12 does not on C++
 
Hi!   From codeblocks.org, exactly 17.20 mingw.setup.exe I have installed code: blocks 17.20 and it works properly on C. Now I want to know about C++ and wi...
[4 replies] Last: The current version of Code::Blocks is 20.03, 17.12 is old and outdate... (by deleted account xyzzy)
How are the __cplusplus directive defined in various compilers?
 
199711L (until C++11), 201103L (C++11), 201402L (C++14), 201703L (C++17), or 202002L (C++20) https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined...
[1 reply] : Note that for MSVS, you need to configure the compiler for this. See: ... (by seeplus)
C/C++ hackerrank question
 
Hi! I have hackerrank for sorting out problems but it’s instructing C stuff in c++ stuff, I have an idea about C it can operate with C++ and from C c++ cam...
[2 replies] Last: heh "i am not getting the error" means he didn't understand the messag... (by jonnin)
button print string?
 
so i just learn new thing on youtube that if i press button once it can print 3 char. so i was thinking can i print a string text if i press button once? the Vk...
[1 reply] : So what is this button? It looks like you mean key (as in keyboard)? ... (by coder777)
Going back to loop
 
Hello everyone, I've managed to tackle my assignment and complete it with the exception of one requirement, this program must loop back to the first menu if the...
[2 replies] Last: You could put the menu into a value returning function - when the cond... (by zapshe)
enter employee info using class
 
Write the code that declares a class called Employee. Provide the following functionality: a. Data members: name, age, yearsOfService and salary . b. Accesso...
[2 replies] Last: This is a typical skeleton class for getters/setters: #include <str... (by seeplus)
by PK Dey
How can I remove the following error?
 
How can I remove the following error? #include <iostream> using namespace std; int reverse(int n) { int x, y, i, k; while(x) { ...
[4 replies] Last: Thanks To all of you (by PK Dey)
Simulations with 2D arrays
 
Hello! New biological triggering device are being tested by government organization. The genuine cost has crossed over. To make the cost lower, you are recru...
[1 reply] : 1. Show what code you have tried. 2. Find a better translator. But I... (by lastchance)
Order of operations in C++ vs MATLAB
 
Hey! I am having an issue converting simple expressions from MATLAB to c++. I believe maybe my order of operations or the place of my paranthesis is causing ...
[9 replies] Last: look for an off by 1 then. matlab indexes from 1, c++ from 0. Maybe ... (by jonnin)
by Rongo
Reading a in file
 
Hello, for a class project I need to write a code that spell checks a book from a file against a dictionary from another file. My code will check the first word...
[6 replies] Last: Your assignment is to use a linked list as a membership predicate st... (by Duthomhas)
September 2021 Pages: 123... 7
  Archived months: [aug2021] [oct2021]

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