Beginners (Page 11)

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)
Create multidemensional array, string and other array
 
Hey everyone, I want to create a listbox where the user can select a chord shape. Then i want t...
[15 replies] Last: Ok thank you, will read up! (by wimvandenborre)
Size of largest string in vector
 
I'm wondering if there is a better way to get the size of the largest string in a vector without usi...
[10 replies] Last: @Peter87 Thanks! You taught me a new pitfall. In this case std::r... (by mbozzi)
How to place a space at the end of cout
 
I need to know why c++ doesn't see the space just at the end of cout function. I'm using CLion and C...
[10 replies] Last: Happy to help. (by Ganado)
Cout not printing in for loop
 
I cant seem to print int x within the for loop. Can anyone tell me why is cout not working inside a ...
[2 replies] Last: How many times do you think the loop is going to execute? Hint: Never... (by AbstractionAnon)
by Hajo93
Struct
 
Can someone pls explain me why this wont work? struct S { int i; double d; const...
[8 replies] Last: It would be helpful if the OP posted a Short, Self Contained, Correct ... (by George P)
Include eight headers, get a 1500kb program. Is this normal? (1,2)
 
Here are the eight headers in question: curses.h stdexcept Windows.h cctype ctime fstream s...
[24 replies] Last: Yeah, I'm not concerned about a 600KB program as a practical matter, i... (by AidanofVT)
Pages: 1... 910111213
  Archived months: [mar2022]

Cannot post in this page. To post a new message, go to the first page.