Beginners - November 2015 (Page 42)

Multiple character problem
 
My problem is that the code only works properly when I type in one character at a time so if I type in 'k' I get cout<<"Remember the program only understand...
[3 replies] Last: cin @ 28 & 38 is not always the best method. getch () would probably ... (by ShiftLeft)
C++ project
 
I'm new to programming, and I need a lot of help with this project. I was wondering if you guys can help me out. I know that there are so many mistakes in my co...
[5 replies] Last: It didn't mention if there could be multiple players in that file. Th... (by galaxylfc)
Classes not being Inherited and help with virtual Functions?
 
Im trying to make 4 classes ( 1 base and 3 derived classes) for different types of Workers for a project. Here's what it looks like when it runs: Walter ...
[10 replies] Last: Im too lazy to type std:: on every standard thing. Find & Replace :... (by TheIdeasMan)
I Need Help
 
I want to mess up with a friend... is there anyway to make the loop run without need to close the first notepad window generated // ConsoleApplication11.c...
[2 replies] Last: Have a look at the Windows API. https://msdn.microsoft.com/en-us/libra... (by integralfx)
Switches
 
I don't know what happened to my last post, but no matter. I figured out how to add command line switches. So below is the program I have been working on today...
[12 replies] Last: if (argc !=2){ std::cout << "Usage:" << '\n'; std::cout << "-w to wr... (by cpq2g1zw2)
Need help with string manipulation code
 
Hi, I just needed help understanding the bolded line, I don't understand how it inverts the characters, especially whats in the square brackets. Thanks //s...
[2 replies] Last: Thanks a lot! (by RAVSHAN02)
Not Getting the right output
 
As an output I am getting: Enter Weight: 200 Enter Height: 300 Weight: 0.00 Height: 0.00 BMI: -1.#J /* The federal government developed a body ma...
[1 reply] : void input(double & weight, double & height) { std:: cout << "... (by TheIdeasMan)
C code in c++ keeps crashing, using arrays and pointers
 
I'm working with arrays and pointers and I feel like my readvalues function is incorrect and is causing the exe file to not respond and crash can somebody pleas...
[5 replies] Last: Thank you very much kind sir, I've been staring at this for a while wo... (by Jonathan Mcnuel)
by bastri
Create objects inside a do-while with contiguos name
 
Hi. I have a do-while inside a switch. Before that I had the definition of a class. So, the thing is that I need to instance objects in the loop with the param...
[5 replies] Last: Thanks a lot to both of you. It seems i have to read a lot to implemen... (by bastri)
Loop start and stop
 
Have to type code simulation for waiting at restaurant but can't stop the loop.Here's my assignment we are only using ofstream and iostream libs: Program #5 Us...
[6 replies] Last: I finally figured it out after tinkering with it. Thank you all who ga... (by patstark76)
Statistical Calculator help
 
So I am supposed to make a calculator that calculate the mean, median, and standard deviation of a list of values. This is what I have so far. The program lets ...
[1 reply] : So I got the sentinel loop to end the inputting data and print the val... (by etsuper258)
Coversion Constructor?
 
Im a bit confused on what exactly a conversion constructor is, how its called, and whats its use is. I was given this following code by my professor as an e...
[2 replies] Last: Hi, Technically, a converting ctor is any ctor that doesn't have the ... (by TheIdeasMan)
Switches
 
I am wondering how I can use command line switches in my program, so that in the case of 'verify' I can use the -v switch and for 'erase' I can use the -e switc...
[no replies]
printing the maximum number
 
can anyone give me a code where the program asks the user to enter 4 integers. Then the program will compute the maximum number. The code must use if else else ...
[3 replies] Last: thanks a lot man i appreciate it (by ripon 123)
Help with Cipher HW
 
My professor wants us to make a cipher program with in todays. the catch is is that she did not teach us anything about ciphers or how to make them. I feel like...
[1 reply] : You have presumably studied arrays and basic flow control constructs, ... (by Duthomhas)
Constructive criticism
 
Tell me what do you think? How could i improve on it? constructive criticism is welcome #include <iostream> using namespace std; int main() { string...
[5 replies] Last: 1: sex is what you do, gender is who you are. 2: Use string vectors ... (by ShiftLeft)
by leo255
Not sure what's wrong with my HeapSort Code
 
Hi guys, I don't get what I did wrong here. For some reason, I'm getting some floating point numbers in my output (shown below), and it's not sorting at all....
[2 replies] Last: You are mixing indices and values. It might be helpful to go through ... (by Duthomhas)
Incompatible Declaration
 
I don't understand why my module declaration is incompatible with the prototype section. #include <iostream> #include <cstdlib> #include <cmath> using...
[2 replies] Last: Wow.. Can't believe I didn't catch that. Thanks! (by etsuper258)
String issue
 
So I'm trying to check part of a string against another part of the same string, but it doesn't seem to be a use of brackets for the location in the string like...
[6 replies] Last: Thanks, that got it. I appreciate the help guys! (by Volgin212)
&& and the ||
 
I'd love if someone can explain to me what does the && do and what does the || do as well.
[7 replies] Last: Basically #include <iostream> int main() { bool b1 = true, b2 = f... (by ChajusSaib)
November 2015 Pages: 1... 4041424344... 53
  Archived months: [oct2015] [dec2015]

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