Beginners - May 2014 (Page 23)

basic calculator question
 
The if statement does not work even when conditions are met for the code below. The output of float variable sum is always 0, what is the reasoning behind this....
[2 replies] Last: And also scanf("%f", &num1); scanf("%f", &num1); // <-- do you mean ... (by nvrmnd)
[Help] map.erase();
 
Hi ! I've a std::map<std::string,Obj*> which contains an ObjA, an ObjB and many ObjC. I made a function which manages collision between ObjB and ObjC (it works...
[6 replies] Last: //ManagerObj.cpp ManagerObj::ManagerObj() { } ManagerObj::~Manager... (by Elekhyr)
by leo255
Need some help with my post-fix calculator
 
Hello, I'm trying to write a stack, and post-fix calculator. With the input that I'll be receiving, there will be a '#' before every number, a '!' before every...
[1 reply] : Just a little update, swapped out the cin.get's for just cin >> so tha... (by leo255)
Stack queue
 
I want it to display something like this Stack: Now pushing 3 Now pushing 5 now poping 5 now pushing 2 now poping 2 now poping 3 sta...
[no replies]
Fstream double print
 
In this code the last line is always printed 2 times why is that how can i solve it assume that in text file the data is : 1 2 3 #include<iostream> ...
[7 replies] Last: Because eof() isn't set to be false until you have tried and failed to... (by Zhuge)
[Help] Smooth movement SFML 2.1
 
Hi, i'm trying to move a sf::RectangleShape : if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left)) { m_Rectangle.move(15 * -1, 0); } if (sf::Ke...
[7 replies] Last: You definately don't want that call to Sleep, maybe you want to set wi... (by naraku9333)
by Mido14
string, insert function
 
I want to insert '.' before 'A' or 'a', so what's wrong with this code? #include<iostream> #include<string> using namespace std; int main() { ...
[4 replies] Last: ok , Thank you for this helpful information :) (by Mido14)
Another Stupid question....
 
I am a noob in C++, Well just started learning for engineering in 11th and this is my question......?? I am trying to fix this program for simplest login p...
[6 replies] Last: @ MiniiPaa Thanks a lot, sorry for a nooby question.... Bye @Abstrac... (by raheel1212)
Class of classes does not compile, 30+ errors
 
I cannot understand why this does not compile. I used these exact(obviously not exact as it doesn't compile anymore) these header files succesfully, tried them ...
[11 replies] Last: Lines 90-91 removed and solution compiled! I would never have spotted ... (by rincewind010)
Cannot get string to display full name.
 
My code is supposed to take the users input of their full name, and then display it. I used the cin >> fullName; and it only returned the first name, I was gui...
[16 replies] Last: Oh, okay. That is what kind of confused me. Thanks for clearing that u... (by BHX)
Placing information into the correct area.
 
I would like to get this to show the amount of money complete with a $ and to two decimal places, I know how to accomplish this in C# but not C++. Also the age ...
[2 replies] Last: Here is the updated code. I think this sums it up nicely. //declarin... (by DEnumber50)
HELP in C++ Programme
 
HI NEED HELP IN THS PROGRAMME!! This is a program for changing Lower case to Uppercase and vice versa.. u have to use same type of data types in the same...
[3 replies] Last: @AbstractionAnon Thx for the help , i was a idiot..... Im new to C++ ... (by raheel1212)
File read question
 
Hi all, I am trying to read an address from a file, but I am trying to ensure that when it comes to the zip code, only digits are entered. Is there a way to...
[2 replies] Last: Thank you! That solved my problem. C++ guru MiNiPaa (by Parasin)
clash of clans hack no survey
 
wat
[1 reply] : I removed spam. (by CodeGoggles)
Help With program
 
Hello, I am newbie in the course of computer science, was learning algorithms with VisualG and passed to C + +, I started making a list of exercises of 10 quest...
[5 replies] Last: You're using c libraries, exclude the cpp input/output stream: #includ... (by closed account j3Rz8vqX)
by ohad
hi there
 
whats wrong in here?! #include<iostream> using namespace std; char *chaf(char *str1, char *str2){ char *st; char c; int n = 0; while(*str2 != ...
[5 replies] Last: Here is a version that mimics how you were trying to do it. Please stu... (by CodeGoggles)
Basic AI Screws Up Whole Program
 
I created a version of 2048, and I also want to create a basic AI that would play the game as long as it could. This is where I am running into issues. My AI se...
[4 replies] Last: There are no compiler errors, but if you want to run through the code ... (by posidon88)
by Matome
Please help me to remove the error
 
So, I am supposed to write a code for matrix addition by two dimensional float arrays. The code is supposed to ask the user to enter the dimensions of matrix A ...
[5 replies] Last: Line 31, 32: You can't allocate an array like that in C++. In C++, t... (by AbstractionAnon)
toal months off by one
 
This is going to sound like an incredibly stupid question but for some reason my months are incorrect. If I enter 1 year my months are off by 1 but when I ente...
[3 replies] Last: The simplest thing to do would probably be to do totalMonths = years ... (by freddy92)
How to link cpp files
 
How can I link two or more .cpp files. What is the difference between linking .cpp with another .cpp and linking .cpp with .h? I don't know how to link .h too...
[5 replies] Last: Thanks (by Gameman)
May 2014 Pages: 1... 2122232425... 55
  Archived months: [apr2014] [jun2014]

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