Beginners - February 2020 (Page 4)

Given input value using loops
 
Hello. Need help with a project im working on. Getting stuck on writing it because it must be written in a while loop without using arrays. With a user inpute...
[7 replies] Last: I got it. It works now. Thank you. (by jimmyjohn2)
by cgill2
C++ test study help
 
Hey guys. My professor gave me some practice problems to complete for our test and I just cannot understand how to do this one. Can someone please help me? Than...
[2 replies] Last: You should start, as repeater said, with coding a program that'll simp... (by zapshe)
Arrays
 
Hi, anyone can help me, i work on this for two days but don't get it. Work with Codeblocks I need creat double array, first column second column third column ...
[5 replies] Last: Thank you, now I understand my mistakes! (by rominch)
How to tell difference between an int and string
 
Hello, I'm new to this and the answer is probably obvious but is there something I can put as that if condition so that if they type a number its prints "invali...
[3 replies] Last: if(a >= 48 && a <= 57) if(a >= '0' and a <= '9') if( isdigit(a ) ... (by ne555)
just learning about loops, can't get this one to work
 
I was out sick last week when they covered loops, and we were tasked to edit last weeks assignment to include one. I went through the lecture code he posted and...
[2 replies] Last: Just looking over it, it all looks fine to me. Ran it with the option ... (by zapshe)
Call Function Inside of IF Statment
 
Im struggling to call the function inside of an if statement in the main(). How can I fix this? Also should I convert the int to string since I'm trying to get ...
[3 replies] Last: Here's start - it checks the first number. The challenge now is how y... (by againtry)
by grae94
foor loop won't stop looping
 
I'm trying to write code for a menu, that continues to ask for options until you type 'q' for quit. It seemed easy enough, but for some reason only one of my if...
[4 replies] Last: BTW use the toupper() or tolower() function to allow for upper vs lowe... (by againtry)
Basic question; passing data type to function
 
Hello, I created a function 'addOneDay' using a special data type "Date". if I call such function, what would be the correct way to pass the data type in this...
[4 replies] Last: And getting closer to a full-blown class: #include <iostream> struc... (by againtry)
bitset not printing correct number
 
Hi guys similar to a question I asked a little earlier I am trying to print the max number of an unsigned long long but to no avail The bitset seems to...
[10 replies] Last: #include <iostream> #include <bitset> #include <limits> using namesp... (by againtry)
by kaio45
Loops and Arrays
 
Hello, I'm a writing a basic program that calculates average, variance, and standard deviation for a set of entered numbers using arrays and loops. I've wri...
[1 reply] : How many elements are in the array ? int i(0); double array[ i ]; T... (by keskiverto)
by akiv
Unhandled Exception??
 
Heyo, i have been following a tutorial on graphics in C++, i keep getting an error that is : 'An unhandled exception was encountered during a user callback'. i ...
[7 replies] Last: vertex_shader was nullptr. why does it come up with this error, if ... (by Ganado)
by Ganado
stringstream.str() lifetime
 
Can someone confirm that the std::string created by the stringstream.str() call is only destroyed AFTER the writeMessage function has ended? I don't need to ...
[3 replies] Last: Thanks ;) (by Ganado)
by fofoun
is it compatible ?
 
Hello, I would like to make a hello world program in sdl graphic mode. I am using devcpp 4.0, I downloaded sdl 2.0.10. These seems not to be compatible. Searchi...
[7 replies] Last: Problem solved, I cannot debug a simple file with no project. Now I wa... (by fofoun)
Create your identity card
 
Create your identity card that includes the following details: - Name: ..... - Surname: ...... - Age: ...... - University: ...... University - Department: Compu...
[5 replies] Last: Hello Guys I did all of them... thank you so much again. #include <s... (by gokhanyildirim99)
problems with asserts on babelfish
 
in my cs3 class we were asked to do the kattis babelfish problem. which wasn't super bad. it works fine and was accepted by kattis. but my teacher wants 3 as...
[2 replies] Last: Also: you never get out of the loop on line 32. Hence it will never co... (by coder777)
c++ client
 
I'm writing a client program that needs to check if a file exists and if it doesn't, create the file, but if it does it needs to compare the user input from the...
[3 replies] Last: C++ has a set of filesystem classes and functions for this sort of thi... (by Repeater)
Help with "?" Operator
 
I received some sample code. I understand all of it except one specific line. I just don't understand what it does, specifically the "?" and ":". Also, is there...
[4 replies] Last: Perfect explanations, thank you all (by simulationspecimen)
Help with multiple definition of main
 
I'm trying to write a code to determine whether a number is a "happy" number or not, this is the code I developed. Originally did it with the main function and ...
[4 replies] Last: -o (name) sets the name of the output file. (by Ganado)
adding a char to a cin value
 
Hello, I have a int value that I take in by cin. And I want to then put that into a function, but I want to add I char letter before that int value, for example...
[5 replies] Last: thank you that works (by MyOnlinePersona)
C++ Compiler Warnings for Unused Variables in a Constructor
 
Hello, I am writing a program that uses a class with dynamically allocated data member in it. In the class constructor for the program, I get errors that the v...
[8 replies] Last: At this stage of the OP's learning curve, warnings should be conside... (by jlb)
February 2020 Pages: 123456... 13
  Archived months: [jan2020] [mar2020]

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