General C++ Programming - March 2021

Assert expressions
 
C/C++ Forum Each of my Vensim simulation modelling applications has a considerable number of C su...
[3 replies] Last: I see lots of bad use of assert() https://en.cppreference.com/w/cpp/e... (by salem c)
Need to remove rows with duplicate values in single column and older datestamp (1,2)
 
Hi I need to remove the rows with duplicate values in single column and older timestamp. I hav...
[25 replies] Last: Create a counter for each each value of order_number that you find, an... (by MikeyBoy)
C++ call stack Problem 2
 
Implement the following function: int max(int a, int b, int c); Your program receives 3 numbe...
[3 replies] Last: > Implement the following function: > int max(int a, int b, int c); It... (by salem c)
by int321
confusion leap year problem
 
This is what my problem is asking "Write a program that takes in a year as input (as a command line ...
[4 replies] Last: thank you for your help, I realized I did the problem correct at the b... (by int321)
can't deference out of range vector iterator
 
Mistake: can't deference out of range vector iterator. file1.cpp using namespace std::chrono; in...
[3 replies] Last: You are going way outside the bounds of your array. Yes, thanks... (by onetwo12)
What is the good way in this string processing?
 
Hi. When you need to split the following string and store in struct, what would be your way to spli...
[8 replies] Last: Thank you guys! It helped me a lot! (by woohyeon)
Total price won't calculated
 
I developed a food menu program about selling sandwich. I don't have any error after compiling the c...
[3 replies] Last: calPrice() needs to return a double, not an int. (by dhayden)
I need urgent assistance with this assignment!
 
Use Weekas1.txt file and load an 8 by 8 integer array. Create the following functions: This funct...
[1 reply] : Looks like your pal got there first: https://www.cplusplus.com/forum/g... (by lastchance)
by Pepito
How do you pass the value that was inputted after each while-loop iteration?
 
Heya, I'm still quite inexperienced with programming since I'm just a freshman here, I just wanna kn...
[5 replies] Last: Line 9: Why is this called loop()? It doesn't loop. A better name i... (by AbstractionAnon)
by akeilo
Needing help reading characters from a .txt file
 
For an assignment I am needing to read characters from a text file and they are set up like this: AC...
[2 replies] Last: #include <iostream> #include <fstream> #include <sstream> #include <s... (by lastchance)
by VDNS
Simple chained lists
 
Please help me with these 2 problems. :) 1. In the file "list.txt" there is a string of whole number...
[1 reply] : Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
by Zenzei
Can help Me make a simple Leaderboard?
 
Okay. so I need help sorting the players. In my server functions can happen in if (btn == "butto...
[1 reply] : >Can someone make this for me? No, but we can help if you make a start... (by salem c)
Library with high perfomance low length integers (e.g. int4_t, int3_t)
 
Are there any libraries that support low range integer and have high performance I am particularl...
[13 replies] Last: How do you store bitfields in arrays For example, struct Foo{ i... (by helios)
Working with comporator
 
I have a sorting. How can I do it with Comparator? Example of code: bool myfunction (int i,int j)...
[3 replies] Last: No, it would be more like if ( comp(a , a ) ) { (by lastchance)
by JRManx
reinterpret_cast error
 
I'm experimenting with some binary files lately. Oh, I hear you out there: "Binary files...wtf?" But...
[10 replies] Last: helios, Oh! Ok, that makes sense. Will what I did work as well, or d... (by JRManx)
Bases of a number
 
we have a number n. We have to calculate the the number in all the bases to n-1 so for example if ...
[7 replies] Last: If n only goes up to 62 ... where would you use the lower-case digits ... (by lastchance)
Using threads gives Segmentation fault
 
Hi, I am working with a program that simulates the Single Model particle procedure. I am following ...
[9 replies] Last: Hi coder777 I found my problem and I will document it here for future... (by jgonzalez2605)
Read the data of the last employee
 
Hi, I'm trying to obtain the data for the last employee Bob Hu. But for some reason, it doesn’t wa...
[5 replies] Last: The code basically says: while (getline()) { if (current name != p... (by dhayden)
Error Message
 
How do I put an error message to this? like for example: you accidentally pressed a letter intead of...
[7 replies] Last: I agree, just a shame that the shell only supports C++14 (by thmm)
No still looping
 
I'm learning c++ at my university. the problem is it is a "Try Another Y/N" but, whenever I chose op...
[4 replies] Last: Something like (not tried): int main() { for (bool done {}; !done;... (by seeplus)
March 2021 Pages: 123... 7
  Archived months: [feb2021] [apr2021]

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