Beginners - March 2014 (Page 10)

Cant figure out
 
It says "illegal else without matching if". How do i fix this. More info: Project is on how much kilowatts a person uses in a month and how much it will cost...
[1 reply] : remove semi-colon on line 17. edit: and then actually read some value ... (by mutexe)
by angelk
Substring c++
 
How can I take a string like this: 1: hello, wow Substring wow and 1?
[1 reply] : I assume you are talking about the substr() function? Well, here it is... (by AceDawg45)
by zdx300
please can someone help me ?
 
The average monthly temperatures for years 2010, 2011, 2012 and 2013 are shown in the table below. You have been asked to write a program that will store these...
[6 replies] Last: how about trying to populate a 1D array? (by mutexe)
reversing a number
 
I have written a code to find reverse of a number and print if if the original and reversed numbers are equal or not .the problem is in the if condition where ...
[3 replies] Last: For some reason you have a conditional before and after the while loop... (by Jamerack)
Issue: (0x000007b), most likely related to SDL2_ttf, help would be appreciated!
 
Upon attempting to compile my code I get the following error: "The application was unable to start correctly (0x000007b). Click ok to close the application....
[no replies]
CRAZY STRING OUTPUT
 
Write your question here. Why does my output look something like this? Hello, □nK // hello.cpp : Defines the entry point for the console applicati...
[2 replies] Last: Thank you very much. I changed the printf statement to: cout << "Hel... (by phztfte1)
setting precision
 
i've declared my variables as doubles, yet when i try and set the precision of the percentage difference the numbers come back as, e.g. -3.2+001 - and it also m...
[3 replies] Last: No I mean you should use std::fixed similar to how you have used std::... (by Peter87)
Should I use mscorllib.dll?
 
Should I #using <mscorlib.dll> for I/O like System::Console::WriteLine("Hello World!"); System::Console::ReadLine(); and everything else?...
[2 replies] Last: OK. But should I use System::Console::WriteLine("Hello World!"); Syst... (by dleanjeanz)
Sorting by alphabetic order
 
THIS WAS SOLVED Thank you keskiverto (1867) for the help
[4 replies] Last: Compromise a bit and make use of std::strings' relational operator < ... (by keskiverto)
by zdx300
Need help with my assingment
 
The average monthly temperatures for years 2010, 2011, 2012 and 2013 are shown in the table below. You have been asked to write a program that will store t...
[1 reply] : Those are the instructions for your homework. Your chance to learn b... (by keskiverto)
by zdx300
really need help
 
The average monthly temperatures for years 2010, 2011, 2012 and 2013 are shown in the table below. You have been asked to write a program that will store these...
[2 replies] Last: sorry please for give me (by zdx300)
by angelk
deallocate memory
 
Hello everyone, I have two dynamic arrays at the end of the cycle, I must deallocate the memory. Can you tell me where I'm wrong. ...code for(;nline>0;nli...
[1 reply] : the problem seems to be in the allocation. Not sure what may be wrong ... (by zsteve)
correct my program plz
 
Hello, i'm trying to write a program that will help a robot driving a car to execute 3 actions:stop,decelerate or go depending to the color: red, orange or gree...
[5 replies] Last: i'm actually using code blocks Are u using C or C++ ? if C++, stop u... (by nvrmnd)
percentage difference of variables
 
hi can someone help - when i calculate the percentage different of the actual number and the approximate number (calculating farenheit when knowing celsius) wit...
[2 replies] Last: thanks! (by LEHCAR95)
class string
 
I have to design a class string that has two member variables, (a)aString, an array of type char with 60 entries, (b) length, and int representing the length o...
[1 reply] : what have you got so far? (by mutexe)
plzz correct my program!!
 
Hey everyone, i'm actually new in c++ and i'm trying to write a program that calculate fatorial, but it doesn't work for me i don't know what is the mistake tha...
[2 replies] Last: aaah thank you soo much, it helped. (by khaoulatan)
by cozier
Problem reading out array
 
I am having difficulties reading out the array properly. I believe my function is reading and adding an 's' to every letter instead of at the very end. I have n...
[1 reply] : In this piece of code, you are accessing the same index over and over,... (by bufige)
"Info: Nothing to Build for <filename>"
 
I heard eclipse was a good IDE to use for C++ , but Im having problems being able to run a program even a simple Hello World program. I get the error "Info: No...
[2 replies] Last: First, the 'w32' doesn't refer to '32' bit (though, archaically, it di... (by TwilightSpectre)
by mrxib
nested for loop not working
 
I am nesting a for loop inside a for loop but the inner loop is not executing. #include <iostream> #include <cstdlib> using namespace std; int ...
[4 replies] Last: I am such a dumb. Thanks everyone. (by mrxib)
by cozier
Help with formatting columns
 
This is a program that lets users see open seats on a plane and then select seats. What I am having trouble with is formatting the output to look more like this...
[1 reply] : You print rownumber once per row but newline NUMSEATS times per row. F... (by keskiverto)
March 2014 Pages: 1... 89101112... 79
  Archived months: [feb2014] [apr2014]

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