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, ...
Feb 21, 2022 at 10:22am
[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...
Feb 21, 2022 at 10:16am
[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...
Feb 21, 2022 at 10:05am
[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...
Feb 21, 2022 at 10:00am
[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...
Feb 21, 2022 at 6:55am
[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...
Feb 21, 2022 at 1:03am
[3 replies] Last: static_assert might be a better fit, it shows at compile-time if the a... (by deleted account xyzzy)
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...
Feb 20, 2022 at 9:19pm
[3 replies] Last: #include <iostream> #include <random> void kafija() { std::cout <... (by deleted account xyzzy)
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...
Feb 20, 2022 at 12:01pm
[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
Feb 20, 2022 at 10:36am
[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.
Feb 19, 2022 at 2:01pm
[1 reply] : Looks like someone gave the OP "the boot", they had posted the same to... (by deleted account xyzzy)
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...
Feb 19, 2022 at 11:03am
[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...
Feb 19, 2022 at 5:28am
[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 -...
Feb 19, 2022 at 4:20am
[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>...
Feb 19, 2022 at 3:27am
[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.
Feb 18, 2022 at 8:37pm
[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 () { ...
Feb 18, 2022 at 2:55pm
[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...
Feb 18, 2022 at 2:45am
[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 ...
Feb 17, 2022 at 9:15pm
[41 replies] Last: That std::array in thmm's code has 7 elements, it is not a single elem... (by deleted account xyzzy)
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...
Feb 17, 2022 at 4:58pm
[3 replies] Last: [quote=TaylDero]Are there any other tutorials? Literally THOUSANDS av... (by deleted account xyzzy)
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...
Feb 17, 2022 at 12:18pm
[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.
Registered users can post in this forum.