Beginners - April 2022

Syntax error that I cannot find.
 
This program prints the same question after the user selects to play again and sometimes it'll print...
[4 replies] Last: vasncode, you should remove line 284 (77 in newbieg's post). It's enti... (by Ganado)
I need some explaining.
 
Hey guys. Good evening. So i've been trying to do a line of code for about a hour now but I don't se...
[5 replies] Last: #include <iostream> #include <fstream> #include <algorithm> using nam... (by lastchance)
Implementing a break in my If-else statements
 
I'm trying to create a program that rolls a random number 1-6, which is then outputted to a die face...
[14 replies] Last: @seeplus you're correct. Those numbers I used correlate to a TDB modul... (by PopSmoke)
I cannot debug my program
 
my IDE is telling me to take out a parenthase on lines 15 and 17, if I do this my program simply won...
[4 replies] Last: the instructions tell me to use it - can we get a full copy of the ... (by newbieg)
Translate code into pseudo code
 
Write your question here. Hello, I am done writing this code for my class and the next step is to t...
[5 replies] Last: Slightly simplified code: #include <iostream> #include <iomanip> #i... (by seeplus)
I don't understand why this function doesn't work.
 
I am new to coding and I'm currently learning about Divide et Impera. I want to calculate the sum of...
[6 replies] Last: Ok, thank you so much!!! Now I understand!!! I gave it as an argument ... (by nandikaka)
location of known substring between 2 points in a string
 
Probably simple, but seems I'm simpler. I want to find location of known substring between 2 poin...
[7 replies] Last: The problem with std::string::substr() is that it creates a copy. Us... (by Duthomhas)
Variadic template functions
 
#include <iostream> using namespace std; void print() { cout << "I am empty function and " ...
[11 replies] Last: Thanks. void Sum(Res&) {} And although this overloaded Sum does not... (by protoseepp)
read comport
 
Hi there, I found an example for i/o on a comport, although, I don't believe I'm getting anything o...
[9 replies] Last: BTW, “comport” is a verb meaning “to be in agreement with ”: ... (by Duthomhas)
function lsqfit() that performs a least-squares fit
 
Write youThe dataset in the file “linedat.txt” contains two columns and it can be described by a...
[3 replies] Last: @jordan Combining the two previous posts with the following should giv... (by againtry)
Custom string class problems
 
Hello, for one of my college projects I am asked to create a basic string class to call upon in my...
[14 replies] Last: Rather than having Mystring convert to const char* implicitly I think ... (by Peter87)
Caeser Cipher
 
Hey guys, I'm trying to displace letters in a sentence using a few functions but I can't figure ou...
[2 replies] Last: char represents the type for just 1 character - not a sentence. Have ... (by seeplus)
Disadvantages of writing full code in header file and not use ".cpp" files?
 
Hi everyone, i know i'm doing it wrong but, as the title says, why can't i simply write the full cod...
[19 replies] Last: If you have only one source file that includes something, then you ess... (by keskiverto)
Add user-input to array until user inputs 0
 
Already got down the 'keep adding to the array' until array is 'full'. But how do I get the program...
[5 replies] Last: Thanks to the both of you -- I'm learning a lot! :) I'll mark this th... (by ssspppa)
How to share program to run for a friend?
 
I just finished writing a small potion store program that just opens the terminal and prompts the us...
[3 replies] Last: be sure to compile it in release mode before you give it out. This he... (by jonnin)
swirly parentheses problems
 
Hello, when I try to run the code it gives me this warning main.cpp:21:5: error: a function-definiti...
[2 replies] Last: Yep, It is working now, thank you for all of your help (by Codeman23)
reading params from list in string
 
Hey everyone, I have the following string: Reply from server: {"success":true,"uses":1...
[5 replies] Last: Yes - if the format of the reply string changes, then that extraction ... (by seeplus)
by sp7cpp
Can we pass pointer to function contains const reference variable
 
I am getting an error cannot convert argument 1 from 'Cars*' to 'const Cars&', for the following sni...
[2 replies] Last: A pointer is not the same thing as a reference. The problem is not c... (by Peter87)
even if(){}code problems
 
So, I'm trying to make a code so, it asks the user what day it is, and the user says a response depe...
[7 replies] Last: [quote=Codeman23]I'm very bad at code There is a free online tutorial... (by George P)
Can I use malloc without sizeof?
 
Hello, Could you please tell me what's the differences between these codes? and give me a clear e...
[4 replies] Last: Be aware that the size of basic types like int or long is not fi... (by kigar64551)
April 2022 Pages: 123... 7
  Archived months: [mar2022]

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