Beginners - February 2022 (Page 3)

by hevi
functions and double/int
 
I cant seem to find the solution to this. I want to ble able to convert cm to m, with a pretty simple math expression cm / 100 = m and I need to use functions, ...
[8 replies] Last: #include <iostream> double M(double); int main() { double z {}; ... (by seeplus)
by hevi
External string to int
 
Hello, need help with some code. I can't seem to figure out how to convert my external file's string values to int. They are string i believe atleast, I get the...
[8 replies] Last: When reading a file that just contains numbers, there is no need/reaso... (by seeplus)
by hevi
What do I do... Im so confused
 
Hi. I cant wrap my head around this... Its been a whole day and cant figure out how to make it show only 1 of the selected measurments. It converts CM to either...
[9 replies] Last: @hevi - you seem to need a refresher on functions and switch(). Have a... (by seeplus)
How to read the file and pass it through the arrays
 
I'm working on my second lab assignment and am not sure how to fill in the body of the code. I'm not even sure that the file is being read correctly. Please let...
[4 replies] Last: L30 i is the number of records read - which could be less than the max... (by seeplus)
functions
 
Can someone please tell me why my void function will not work? It is supposed to read out the message. #include<iostream> #include <iomanip> using namesp...
[5 replies] Last: Putting all that together we get the following. That took about 2 minu... (by againtry)
by AAAbb7
Command not found
 
When I try to run my code and I input "B" or "b4" it always just tells me "command not found" in the terminal. Its supposed to have a "0" or "1" output. Does an...
[3 replies] Last: static_assert might be a better fit, it shows at compile-time if the a... (by George P)
by hevi
Call function for random amout of times
 
Hi, I would like to ask if its possible to create a random number generator and for the output to be how many times a function is called. I made 2 functions and...
[3 replies] Last: #include <iostream> #include <random> void kafija() { std::cout <... (by George P)
Compile error on a library from github (subhook)
 
I am trying to compile this simple hooking library: https://github.com/Zeex/subhook and I am getting these errors: 1>subhook.obj : warning LNK4006: subhoo...
[3 replies] Last: Looks like all I had to do is to only press "Include In project" on su... (by warchief)
Remembering user assigned values
 
made this while sick, ignore the question
[1 reply] : What C++ are you having difficulty with? Do you know how to display te... (by seeplus)
by thmm
Jumble Solver
 
The code snippet you posted looks like Java, but this is a C++ forum. Probably better to post it in the jobs section.
[1 reply] : Looks like someone gave the OP "the boot", they had posted the same to... (by George P)
Reading from file using a struct with an enum
 
I am supposed to read a table of content with members in the struct which includes an enum. There's a read function to be made. Also I'm supposed to output th...
[14 replies] Last: @hshdhjsj12345. Based upon your code then perhaps: #include <iostre... (by seeplus)
My friend needs help with his project I dont know why one line isnt being read
 
Write your question here. // This program calculates how much a song makes on different streaming services #include <iostream> #include <iomanip> #in...
[1 reply] : http://www.cplusplus.com/forum/beginner/282283/ (by againtry)
by limwn
Edit the member details
 
Hi, I have a binary file called member.bin and I want to read the data from the file and let the user edit the data. -DATA FROM MEMBER.BIN- Member Details -...
[4 replies] Last: The tricky bit is knowing how to open the file for update mode, and ho... (by salem c)
My friend needs help with his project I dont know why one line isnt being read
 
"cin >> views seems to not work" it simply ignores it // This program calculates how much a song makes on different streaming services #include <iostream>...
[3 replies] Last: Here's a start to a flood of possible improvements and simplifications... (by againtry)
Arrays and pow
 
I need your help. How can I write a matrix(3*3) with random numbers. And then, ask the user to type N to pow and show the results of the pow of that array.
[13 replies] Last: ^ just to give some reading material for what jonnin is talking about:... (by Ganado)
code outputs 1 and i dont know why.
 
when i execute this it outputs 1 right before answer and i dont know why. i'd appreciate it if you explain it :) #include <iostream> int main () { ...
[1 reply] : oh nvm i just remembered i put CERR :D oopsie (by somecuriousguy)
Error in Template function in header file
 
I want to create a template function that would retrieve different data type input from cin I defined a function like this in my header file util.h #ifn...
[4 replies] Last: OK got it! Kudos and thank you all for being so helpful to c++ newbie... (by shaefayejem)
classes, functions, or ??? (1,2,3)
 
Hi everyone, I'm learning to apply a few principles by writing a text-based story game with choices and far-reaching consequences. So far, the minor details ...
[41 replies] Last: That std::array in thmm's code has 7 elements, it is not a single elem... (by George P)
Tutorials?
 
Hi, completely overwhelmed with my first ever C++ class and feel like I don't have any proper understanding of the basics. Does anyone have a recommended so...
[3 replies] Last: [quote=TaylDero]Are there any other tutorials? Literally THOUSANDS av... (by George P)
Inputs and conditions
 
I'm trying to make the conditions based on the inputs of age and vaccine status, but it doesnt seem to work. and also if the age input is two digits its skip th...
[4 replies] Last: Alright, thank you all for the help. everything worked perfectly after... (by daddymomo)
February 2022 Pages: 12345... 7
  Archived months: [jan2022] [mar2022]

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