Beginners - January 2016

Type Issue?
 
Hi there, I am new (hence beginners). I am having issues with a program I am writing. Program: I have multiple questions to answer before getting to some c...
[16 replies] Last: Perfect. Thank you! I will do the code tags from now on. Just as a... (by otkirsch)
RETURN
 
I am a beginner and all help will be fine. I was trying to learn what "return" does and I did 2 func (one of with return, one of without return) but 2 of them w...
[6 replies] Last: They go back to where they were called from. If 1 is returned, the if ... (by TarikNeaj)
Dealing with money in C++
 
I'm currently learning C++. I have to write a simple class Money that performs calculations involving dollars and cents where arithmetic has to be accurate t...
[1 reply] : When should I round values, before or after using data in arithmetic ... (by Moschops)
Help with program. Works but doesn't read from class file.
 
My int main works just fine however, when my program calls swimmingPool.h it closes and doesn't finish with the rest of the program. I do not have any errors or...
[3 replies] Last: add cin.get(); before return 0; (by RUNNER PRO AGARIO)
Checking if input is character or integer.
 
I just wanted to challenge myself into making a program that only gets the value of a variable, and then, if it is a character and not an integer, open an error...
[3 replies] Last: @TarikNeaj, how would that work all the time, see, for example wouldn'... (by RUNNER PRO AGARIO)
"Pretty bird...Pretty bird"
 
Any suggestions for this program? It works. Just looking for pointers. Thanks! #include <iostream> #include <iomanip> using namespace std; //****...
[8 replies] Last: YAY, SOMEONE LIKES AGARIO TOO. !cin is a validator, that validates c... (by RUNNER PRO AGARIO)
by r merc
Why is the third element short 256
 
I wrote this as part of an assignment and I can't seem to find the bug in it. What is happening is that the third element of the structure (the integer) is com...
[2 replies] Last: use code tags for writing code please (by RUNNER PRO AGARIO)
by anony1
opencv clapack and visual studio
 
hi Hi I am trying to run the code of a visual object tracker that is written in c/c++ and is advised to configure using opencv 2.1 and lapack .however I am tr...
[no replies]
whenever I type correct choices, it still says INVALID, other letters should be invalid help please
 
here is the code: #include<iostream> using namespace std; main() { char parking_lvl; float parking_hrs,total,discount; cout<<"Enter total hours: "; cin>...
[1 reply] : Your code will put invalid every time the entered parking level is not... (by Shadowwolf)
Unresolved externals
 
I'm studying templates but can't find how to write a prototype for it. 1st code is function and 2nd is prototype. Help me please. Sorry for my bad endlish ...
[4 replies] Last: Ok, I wasn't sure about that, because I am also a beginner sort of. (by jgg2002)
Making a square frame out of asterisks
 
I've almost finished my code for this, but for some reason the output is like this: ********** * * ********** * * ********** * * ***...
[7 replies] Last: That is the output I am getting with width = 10, height = 5. *******... (by Stalker)
by ak10
unable to create new file with user entered name
 
I want to copy the contents of an existing binary file to a new user created one but the file is not getting created. case 3: { fio.open("mh.dat",io...
[2 replies] Last: Thanks a lot, i changed it to dd-mm-yyyy and it works (by ak10)
string not comparing perfectly
 
It is not comparing strings perfectly e.g if i type string1=eng and string2=english the output results in both are same. int main() { char string1 ,stri...
[1 reply] : Problem: i string1 string2 temp 0 't' 't' ... (by naaissus)
by Repix
Help *DLL INJECTOR*
 
I get some errors with this code, and it was just working! Also some vars corrupt for no reason. (I'm a beginner with c++) #include <iostream> #include...
[1 reply] : Why do you unnecessarily open "config.txt" in main() and in InjectD... (by integralfx)
I'm stuck please help
 
Hi, this is an assignment for an intro to C++ class. When I run the program the totals for the Itemized bill should equal Total Room Charge = $600, Total Resort...
[2 replies] Last: Thank you. (by SiliconPatriot)
Return a value
 
Why do you have to have a "return 0;"at the end of your function? I understand that every function has to return a value (except a void function), but what does...
[2 replies] Last: If you're asking, "Why does the main function have to return something... (by xismn)
cant get average from arrays
 
I am trying to get the average scores for all of the students for each test. I have gotten my code to work but when the average scores are outputted its showin...
[5 replies] Last: but I am getting the same number for my averages. Yes. You're calcu... (by cire)
How to call a method of a method
 
I'm not even sure how to ask this. I have a vector of objects. I have methods to manipulate these objects. I want to manipulate an object at vectorName...
[1 reply] : I think this is what you want to do: std::vector<MyObject> myObjects;... (by JagerDesu)
Size in bytes of integer types
 
I have the following code. The output for the first 2 is 4. The output for the last is 8. Why is a long integer the same size of a normal int (4 bytes)? I am r...
[7 replies] Last: Something like this, perhaps. #include <iostream> #include <cstdint>... (by JLBorges)
Pulling strings out of a string without stringstream
 
I realize I'm overcomplicating things but my thought process is this. I have a string called "description" all I want to do is break it up into 76 character lin...
[7 replies] Last: > My main point is that there's no need to incur the overhead of split... (by JLBorges)
January 2016 Pages: 123... 29
  Archived months: [dec2015] [feb2016]

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