Beginners - April 2022 (Page 5)

Help on this Lab
 
Write a program that repeatedly reads in integers until a negative integer is read. The program also...
[2 replies] Last: What help is required? What don't you understand/am having a problem w... (by seeplus)
by Ganado
read a text file into a class
 
would it be possible to get the text file into the class format Are you saying you want to change t...
[1 reply] : Is this a homework assignment? Or work related? Because creating a se... (by Duthomhas)
How to save code to a .txt file over multiple sessions
 
I'm creating a program that will create a "company" profile (not actually used by companies), and th...
[2 replies] Last: 1. Make a struct (or class ) with all the information for a single ... (by Duthomhas)
inserting a class object into a map??
 
Hey yall, so we have an assignment dealing with maps, and I think I understand them, but I cannot ge...
[4 replies] Last: Thank you all for the responses, Ganado was very helpful but Peter87 h... (by dorito200)
Struggling with an infinite loop and a sub for global variables
 
I have 2 questions. My first program I am struggling with an infinite loop but I dont understand wh...
[6 replies] Last: #include <iostream> using namespace std; void average(int , int); i... (by againtry)
File to a 2D array
 
I have a problem where i need to take different parts from a file and put it into a array. the fi...
[6 replies] Last: This can be simplified. Consider: #include <iostream> #include <str... (by seeplus)
dynamic parameter function
 
Hello @all Suppose I have a function struct s_input{ ... }; s_input in; void test(...
[8 replies] Last: I think jonnin's suggestion will work for purposes of printing (you wi... (by Ganado)
Create struct in header file and reuse it.
 
Hey, I'm writing a program which contains this map: const fifo_map<std::string, std...
[8 replies] Last: ok thank you all, i understand now, someone else also pointed me to nl... (by wimvandenborre)
recursion error?
 
I made a code to check if a string is a palindrome. It works just fine for non-palindromes, but it o...
[9 replies] Last: #include <iostream> #include <string> #include <string_view> #includ... (by seeplus)
what's wrong with my code?
 
Hi im trying to make a program to prime factorize a positive integer, but it doesnt seem to work. Ca...
[16 replies] Last: @lastchance Omg that makes senseee thats why it didnt work beforeee ... (by sultan0104)
If Loops & Input From Data File
 
Hello all! I'm a beginner C++ student in her first class. I seem to be struggling with getting the c...
[7 replies] Last: temporarily add this to the beginning of main() system("echo %CD%"); ... (by dhayden)
vector question
 
whats the difference between these std::vector<int *> tmp vs std::vector<int> *tmp?
[7 replies] Last: thanks for that. From time to time I have days where I just can't get... (by jonnin)
c-strings prog 7
 
Hello I am technically done with this project but I would like to get some feedback by someone more ...
[5 replies] Last: An advantage of c-style strings is that for those that don't change th... (by seeplus)
Passing enum to a struct
 
Write your question here. enum class Operation { Add, Subtract, Multi...
[2 replies] Last: Thank you so much for this!!! (by eikkaaaaa)
Visual Studio C++ warning C4829: Possibly incorrect parameters to function main.
 
It has been a very long time since I wrote C++. I have the latest VS 2022 community installed. Whe...
[3 replies] Last: Thanks for the responses. Like I said it has been a long time since I... (by DeepH2O)
1 % 0 and boolean values
 
This was our exam question. I said it will be 4th but IDEs say it's 2nd. How can second "if" be tr...
[7 replies] Last: I didn't hear about that "fact" while having a udemy course of Frank M... (by bydrachen)
by razzzz
Weird initialization of shared_ptr variable
 
Hi all, first of all, I hope the "beginners" forum is ok for this question, I'm not 100% sure. I'm...
[2 replies] Last: @Peter87 thank you very much for the thorough explanation! Things defi... (by razzzz)
Short way to add if statements to while loop.
 
Hey everyone, I'm lookin for a way to add statements to my while loop Now I have this: while...
[6 replies] Last: it works! tx! (by wimvandenborre)
Lines of zeros when reading from file
 
I am trying to read the following information from a file called inputInventory.txt but i get a bunc...
[4 replies] Last: #include <iostream> #include <fstream> #include <string> #include <... (by againtry)
by ice60
What C++ GUI framework should I use?
 
I have programmed C++ console applications as a hobby for the past year or so. My school took notice...
[3 replies] Last: HTML and JavaScript. (by Manga)
April 2022 Pages: 1... 34567
  Archived months: [mar2022] [may2022]

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