Beginners - November 2012 (Page 66)

main() and jousting project
 
I'm having trouble writing a main() function for my program... It needs to include 1. ask 10 questions 2. create two knights 3. Have each knight display. 4....
[4 replies] Last: The () of a function call are the parameters you are passing to that f... (by Raezzor)
Array Problem
 
Hello, I have been scouring the forums and have not found a solution to my problem. OK here it is. I am a beginner about 5 weeks into first term Programming L...
[2 replies] Last: Thank you so much. I have been going over this all weekend. I did not ... (by InvaderGUI)
Using private class members in a friend function
 
Hi, all. I'm trying to overload the << operator as a friend function in a class definition I'm writing. I've been told that in order to use any of the private ...
[1 reply] : I don't see a problem. I had no problems compiling it with VS2010. (by AbstractionAnon)
by dday9
New to C++
 
I am new to C++, but not new to programming. I've very proficient in visual basic.net and I can read and some what write in C#(which is c based). So my question...
[1 reply] : Go to xoax.net. This website has C++ tutorials, Java tutorials, PHP t... (by closed account EAUX92yv)
a function that reads a text file
 
Hi there I'm trying to create a function that will get a text file and return a vector of strings, one for each line. I think my main problem is that I do...
[9 replies] Last: Hey thanks for the help! My problem was I put the txt file in the same... (by achieven)
defining identifiers
 
How do you define an identifier. That is all i want to know. Thank you.
[1 reply] : int identifier; Of coruse, you can use any defined type instead... (by AbstractionAnon)
Combining mortgage .cpp with Banking .cpp
 
I have two applications that complete different activities, one is a simple banking program and the other is a mortgage application program. I am trying to comb...
[1 reply] : Here is the mortgage application as discussed above #include <iostrea... (by DavidBrent)
Term does not evaluate to a function taking 1 arguments??
 
Hello, I have prepared a code for my homework assignment in my intro to programming class. I had to write a program the requests a password and verifies that...
[3 replies] Last: Not only what the above have stated, but Password is declared as type ... (by Raezzor)
by Gomboo
i cant find my mistake .....pls check it
 
#include<conio.h> #include<iostream> #include<iomanip> #include<string> using namespace std; class employee { private: ...
[4 replies] Last: You still did not place it in code brackets and did not tell what the ... (by ryancb06)
Function that doesn't allow user inputted negative numbers
 
I'm trying to work a function into my program that won't allow the user to input a negative number. The function I have so far is: int negatives () { ...
[5 replies] Last: First, modify get_non_negative() to accept and return a non-negative... (by JLBorges)
finding gcd
 
I have a code that finds the gcd of two numbers, I know it works, but dont understand how it is finding the gcd. Can anyone help me? long gcd(long x1,...
[2 replies] Last: http://en.wikipedia.org/wiki/Euclidean_algorithm (by JLBorges)
Function for getting player names not working, suggestions?
 
I am trying to write a game(for my class) that can have between 1 to 4 players. I use a string for each players name. I pass the string by reference to the func...
[3 replies] Last: I figured it out. A \n remained in the input stream from a previous in... (by drakescale)
Putting a sentence into a 2D array
 
I want to input a sentence in exactly 5 words. The sentence splits into strings. These strings will be stored in a 2D array. For example, Input: There is a re...
[no replies]
Checking the file
 
Hello, I'm having difficulties trying to think of a way to check if a file is empty or not. I have an assignment which says something of the sorts " Check if t...
[8 replies] Last: I don't see how you rewrote the if. It looks exactly the same. Yo... (by AbstractionAnon)
by nexos
need help with fractions
 
......I need help to shorten my fractins.......here is my code #include <iostream> #include <cmath> using namespace std; struct ulomek // struktura {...
[no replies]
Extern with Class Objects
 
I get the error "error C2512: 'Button' : no appropriate default constructor available." I've tried it with extern Button buttonStart(parameters), extern class B...
[2 replies] Last: You haven't show us the declaration for your Button class. At lin... (by AbstractionAnon)
file input of mixed types
 
I am writing a program where I need to handle an inventory file of mixed types integers and strings. An example of my data file would be as follows: 55555 3...
[6 replies] Last: int main() { string line; ifstream infile; int num, ... (by AaronTrahan)
fstream and string getline problem
 
Having something of a problem with an exercise. The program is meant to read in a series of names and donation amount to an array of structures from a text file...
[6 replies] Last: Yup, that's exactly what my txt file looks like, with the first line b... (by Raezzor)
Calculations coming out wrong
 
I am implementing functions from a header file I have been given, and I can't figure out why the numbers are not what they need to be. this is part of the ....
[1 reply] : Square::Square(float initialDim){ initialDim=dimension; } If you ... (by cire)
Cin gets ignored ?
 
Same story again. In the void nfile() and in ofile(), the program gives the output but ignores the input (cin) and gives the output: "Error occured...". Can ...
[1 reply] : http://www.cplusplus.com/forum/articles/6046/ You need to clear the i... (by Moschops)
November 2012 Pages: 1... 6465666768... 75
  Archived months: [oct2012] [dec2012]

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