Beginners - October 2011 (Page 18)

Fraction Processes
 
I'd like to input a fraction, i.e 1/2 +3/4 and get the result of that. Whats the best method for reading the input?
[3 replies] Last: You just have to parse the string. It's a useful skill :) Iterate th... (by ascii)
Visual C++ 2010 Compiler Glitch?
 
I'm trying to write a simple game. I made a class for the player object, and allocated the memory for the health and points dynamically so I could delete them l...
[2 replies] Last: Thanks. I was under the impression that the new changed a pointer in... (by Liuqahs15)
by abby11
Trouble with a for loop and display in program
 
Hello, have to write a program to calculate the monthly, balance and interest paid on a balloon mortgage. The program must use a for loop to process the pa...
[5 replies] Last: You're welcome... (by whitenite1)
area of a triangle
 
what is wrong with this problem,i need some help. #include <iostream> #include "conio.h" #include "math.h" void main() { float a,b,c,d,p,s; cout<<"S...
[1 reply] : Can you be more specific? And, please, when including code, post it in... (by mzimmers)
by seini
error "lacks a cast"
 
what does this error mean???? passing `int *' to argument 1 of `scoreSpecificPlayer(int, basic_string<char,string_char_traits<char>,__default_alloc_template<fa...
[2 replies] Last: thank you ....you for the help ...let me look at it and if i have anot... (by seini)
Correct my code: it seems far too complicated.
 
I wrote a program for beginning C++ class that calculates costs of long distance calls using "if" and "else". The assignment was as follows: "Write a program th...
[4 replies] Last: Thank you to everyone that commented, I don't mind the criticism at al... (by Jodezilla)
If...Then...Else, or Boolean?
 
I have a very general question, not too hard to solve, lol. But does the C++ programing language include "If...Then...Else" statements, or do you have to use b...
[2 replies] Last: cool, thanks. (by IWishIKnew)
Operator overloading and stacks
 
So my homework assignment is to overload the == operator to see if 2 stacks are the same or not. I overloaded the operator and wrote the definition, but I have...
[7 replies] Last: I would say to use Code::Blocks, it a lot more standard C and C++ than... (by BReynolds)
What is this?
 
What is that Character(string newName); ? Is it a void? I have never seen that before, and when I put it into my compiler, it gets a error. class Charac...
[1 reply] : It's a constructor. And you shouldn't get an error, that's all perfec... (by Disch)
Compiler doesn't work
 
So, im using codeblocks to write C++ and i have MinGW, but for some reason, it wont compile the first program in the tutorial... any one know whats wrong with ...
[15 replies] Last: .cpp extension = works perfectly! God this is so much better the ms v... (by IWishIKnew)
by DG 55
How to unit test a main() function?
 
Hello, I have a program with just a main() function that contains some cin. I want to create unit tests that run the program, send in input for the cin, a...
[4 replies] Last: I found one solution: I used _popen to open the program I want to tes... (by DG 55)
How do I work with binary and individual bits and write just one byte?
 
I am a little frustrated because all the books I have are working in integers or other that are at least four bytes each. I want to be able to read in a variabl...
[10 replies] Last: istream::read() works with chars; http://www.cplusplus.com/reference/... (by andywestken)
by arooj
Halloween Selection Solution
 
Alright, so i have to create a program which displays a halloween images, the following directions were given to me: Create a program which will ask the user...
[5 replies] Last: The mistakes you do are so simple. I mean...to print on the screen a s... (by CosminNTG)
References to structures.
 
I'm having a bit of trouble with a function that prints the entirety of a structure, but when attempting to tell the structure what the variables inside it mean...
[4 replies] Last: Okay, thanks! (by Ben Duncan)
How many times to repeat?
 
i need help here is problem The positive integer number N is given. We subtract from this number the sum of its digits. From the received number we soon subt...
[3 replies] Last: actually i copy paste this problem what alghorithym can i use to solve... (by TURAL MeLIKLI)
Unexpected end-of-file found
 
Hey, I'm just starting and I am using Visual Studio 2010 as a compiler. I get the error: Unexpected end-of-file found. Here is the code. #include "stdafx.h"...
[2 replies] Last: Nevermind, I got it :) (by Jack Black)
by De1
Error using vector::erase()
 
I keep getting the error: no matching function for call to `std::vector<Menu_Item, std::allocator<Menu_Item> >::erase(int&)' int item; cout << "Pleas...
[8 replies] Last: So if I understand you correctly, any iterators that are not correcte... (by moorecm)
by pooshi
Big-O Question
 
Hello, I am doing a radixSort to determine some Big-O values and I stuck. When I debug the code it runs until the switch statement, with initial value being zer...
[5 replies] Last: I figured it out. Thanks guy's. (by pooshi)
by lenn18
How do I program the fibonacci serie?
 
I'm a beginner c++ programmer, and I need to make a code that show the Fibonacci serie. I have been trying some examples but I can not do anything. I declared ...
[3 replies] Last: Thanks a lot for the code as you may know I am very new at this, you'v... (by lenn18)
invalid initialization
 
Hi, I am working in IBM Linux. When i am running the following statement its giving me an "invalid initialization" error. fpos_t file_curr_pos=0; when...
[2 replies] Last: fpos_t is not meant to have a value explicitly assigned by you. It is ... (by Moschops)
October 2011 Pages: 1... 1617181920... 59
  Archived months: [sep2011] [nov2011]

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