
please wait
by hevi
No clue
|
Hi, got a problem with my code. Keeps saying error : cant convert string to int. But Im not trying to do that :D Cant figure out why it thinks that. Sorry for t... |
Feb 28, 2022 at 9:01pm
[7 replies] Last: It's because in the info function you put int first, string second and... (by mikef)
|
using const with function |
what is the purpose of using const with function void readData () {} void readData const () {} |
Feb 28, 2022 at 5:19pm
[3 replies] Last: It is a promise that the function will not modify the object that it's... (by Peter87)
|
by LeslieS
Stuck trying to #include interdepenant headers
|
I have two classes and in each class I would like to have a pointer to an instance of the other. But the compiler is complaining because I can't use one type ... |
Feb 28, 2022 at 3:26pm
[4 replies] Last: >You must forward declare ClassB. and you must forward declare ClassA ... (by ne555)
|
by HellocMonkey
Error code not in scope
|
I have been working this program for a while for my class so far it will not compile. The instructor was nice enough to let us take a screen shot but I only got... |
Feb 28, 2022 at 12:30pm
[4 replies] Last: Simply without input validation consider: #include <iostream> using... (by seeplus)
|
by AkiraC
How to perform insertion sort for array with more than one variable?
|
Hi, I have an array with more than one variable, eg: ID, name, gender etc. And I want to perform sorting for the data in the binary file, so I decided to use in... |
Feb 28, 2022 at 12:22pm
[2 replies] Last: There's something oddly familiar about that code.... Mmm, interesting... (by salem c)
|
Printing out name of station that matches max and min temp in a file |
Hello, I have a file that has a bunch of information in it about weather data. I currently need to find the max temp and the min temp and print out the stations... |
Feb 28, 2022 at 11:53am
[6 replies] Last: Another way of getting rid of the preceding whitespace is: while (st... (by againtry)
|
by PhysicsIsFun
sample without replacement - efficient way
|
Greetings! I have an array of which I would like to draw n samples without replacement. The quality of the randomness as well as computational efficiency is imp... |
Feb 28, 2022 at 9:21am
[12 replies] Last: [quote=mbozzi]Could you be thinking of Fisher-Yates? I was! But I had... (by lastchance)
|
by hevi
Decompressing RLE
|
Hi, I have an RLE compresser which works perfectly fine, but how do I decompress it? I have no idea how I would come about doing it. Any help? Below is compress... |
Feb 28, 2022 at 1:40am
[15 replies] Last: hevi, STOP reporting posts you don't like. That makes people consider... (by deleted account xyzzy)
|
by Shervan360
Size of Char in C
|
Hello, I ran the following code in Visual C++ and I have 1 and 4 In GCC 11.2 I have 1 and 1 Why in Visual C++ do we have 4 for a character? Thank you ... |
Feb 27, 2022 at 3:44pm
[6 replies] Last: sizeof(char) is always 1. (by Peter87)
|
by elon dusk
Keep getting 4 errors in my code and dont understand
|
hey. in my code im keep getting errors and i don't understand what they mean and how I can correct it. Im fairly new to C++. #include <stdio.h> #include... |
Feb 26, 2022 at 5:13pm
[4 replies] Last: If you have something like a vector, then you can sum the contents eas... (by seeplus)
|
by AlterBlast
C++ program to read integers until 0 is entered using sentinel.
|
Hello, I'm trying to write a C++ program to read integers until 0 is entered using sentinel. (1) Display the sum of the two-digit numbers (both positive and ne... |
Feb 26, 2022 at 11:52am
[8 replies] Last: [See also http://www.cplusplus.com/forum/beginner/282399/ ] (by seeplus)
|
by Enderex
I need help with this assignment
|
I need to write a code that loads 5 numbers from a user and sums up the ones that have only 2 digits. I tried with if statements directly but couldnt get it to ... |
Feb 26, 2022 at 11:50am
[3 replies] Last: #include <iostream> constexpr int NoNums {5}; int main() { int re... (by seeplus)
|
by AlterBlast
C++ program to read integers until 0 is entered using sentinel.
|
Hello, I'm trying to write a C++ program to read integers until 0 is entered using sentinel. I want the before 0 integers to be read but the 0 not to be and the... |
Feb 26, 2022 at 10:45am
[1 reply] : [Duplicate post] (by seeplus)
|
by AlterBlast
I can't figure out this assignment.
|
Hello, I'm trying to write a C++ program to read integers until 0 is entered using sentinel. I want the before 0 integers to be read but the 0 not to be and the... |
Feb 26, 2022 at 10:44am
[5 replies] Last: [See http://www.cplusplus.com/forum/beginner/282399/ ] (by seeplus)
|
by AlterBlast
I can't figure out this assignment.
|
How would I go about making a different message appear when no positive integers or negative integers are entered, instead of it showing a really large or small... |
Feb 26, 2022 at 10:42am
[3 replies] Last: Perhaps: #include <iostream> #include <limits> constexpr int MinIn... (by seeplus)
|
by Paul50002
how to get a file line to do more than just print? (1,2)
|
hello, how can you get a text file with data like this do more than just print out a line. Fred Farkle 72 69 17 21 23 14 22 Tina Moffett 81 86 23 25 19 25... |
Feb 25, 2022 at 6:46pm
[21 replies] Last: I liked my highschool's system best of all. 10 points per grade, so 9... (by jonnin)
|
by SubZeroWins
operator overloading
|
In my book the below code for the operator + is written in a way that makes a new temporary Date and returns it without affecting the original object. What if I... |
Feb 25, 2022 at 4:16pm
[6 replies] Last: If you want to something custom & weird, I recommend using things like... (by jonnin)
|
by lare26
Disfunctional Function Declaration (1,2)
|
I am trying to figure out why this doesn't work. I thought I was doing it correctly. But the scope seems to be quirky. It says the variables are not declared i... |
Feb 25, 2022 at 2:22pm
[32 replies] Last: [Moved making a game chatter here]: http://www.cplusplus.com/forum/lou... (by deleted account xyzzy)
|
by vboro
do{...}while(...) loop to chech array?
|
Hi! I have an array with numbers from the user. My task is to then std::cin numbers and check if it's in the array. If it is, the program should quit the loo... |
Feb 25, 2022 at 1:59pm
[5 replies] Last: seeplus's first sugestion worked perfectly fine, just what I wanted my... (by vboro)
|
by Quasar999
Constructor syntax
|
Someone could explain me the following declaration for the contructor? class GameError : public std::exception { private: int errorCode; std::string... |
Feb 25, 2022 at 12:21pm
[3 replies] Last: As you browse those those linked pages, you should also notice that ... (by keskiverto)
|