Beginners - March 2012 (Page 65)

Void Functions
 
hey guys... I am doing an assignment for my c++ class and I am running into trouble with a Void Function. The teacher says this: "Set up this as a void f...
[7 replies] Last: I am having the same problem with this and maybe I am having a brain f... (by Rbroke)
HELP ASAP!
 
i dont know how to do this. Can anyone help? Write a C++ program that finds the smallest divisor of a number or determines if that number is a prime number....
[3 replies] Last: If a topic is posted in the wrong area you can always click Edit Topic... (by LB)
Error Handling with Function Pointer
 
Hello everyone. I'm new to C++ and need help passing a function pointer to handle error states. temp1 is cin input from user and temp2 is user guess for square...
[4 replies] Last: Nice, that seemed to have done the trick. I knew something wasn't gett... (by optimus203)
loopy
 
I don't know what to do here and no one seems to have an answer that I can use. I guess I can't use the function like this but isn't there some other way to ini...
[6 replies] Last: Ahhh ok that was stupid of me. But thank you! (by Ryan Bush)
Noob in dire need with 'ignore' function -
 
Hello, new coder here. I'm having trouble implementing the 'ignore(256,'\n)' function into my code. My program reads these numbers from a file: 31.5...
[2 replies] Last: Hmmm. (by RoadRage51)
simple code help
 
ok so i posted earlier and finally fixed my problems with those files, however now i have 2 errors with my Menu.cpp file #include "Menu.h" #include <iostrea...
[1 reply] : [code firstline=777]void Menu::read() { //cout << "Read file name then... (by LB)
by Shlomo
invalid conversion from ‘const char*’ to ‘char’
 
I'm trying to compile the following example from Koenig/Moo's Accelerated C++: 1 #include <iostream> 2 #include <string> 3 4 int main() 5 { ...
[2 replies] Last: Ahhh--thank you vlad. Didn't realize there was a different between dou... (by Shlomo)
file opening in new window
 
iv been digging the google for some time now and can't figure out how to open a txt file in a new window if i enter some character to trigger it and open the fi...
[no replies]
by moot1
rpg game
 
HI tell me what you think about this program. Also how can i put a class in it or is it too small to put a class #include <iostream> #include <cstdlib> #inclu...
[15 replies] Last: do you know why 1 player isnt working? #include <iostream> #include <... (by moot1)
Trying to store an array inside of another one
 
I am making a function that finds the inverse of a matrix, so I am using arrays to represent the matrix. I will also be putting my inverse code in a header file...
[no replies]
If Else fail
 
Hi I have followed a book called C++ through Game Programming. Where I found a program called Hero's Inventory. I wanted to modify that program, but it I hav...
[7 replies] Last: The problem is in these statements int tradeSwordAxe; cout << "\n... (by vlad from moscow)
What type of loops would I use, and what would I check for in the conditional statements( what type)
 
I just need to know what types of statements for the following: De nition 1. An arithmetic series is the sum of a sequence fakg, k = 1; 2; : : : ; in which ...
[no replies]
by rb485
Array as reference parameter
 
I am trying to write a function which swaps two elts of a character array. I want to use the array as a reference parameter , but I'm not sure how the syntax sh...
[9 replies] Last: In fact you are trying to swap two objects of type char. So it can be ... (by vlad from moscow)
HELP!
 
SO... trying to finish this program before its due tonight and i am stuck i cant get the program to work. ANY HELP IS GREATLY APPRECIATED! The description is...
[1 reply] : I fixed some of the errors in your code. It should work as long as you... (by wolfgang)
Stringstream
 
hi, i am trying to check to see if the user is actually typing a valid number and not a letter or anything else so im using getline and then checking the data a...
[1 reply] : You don't need to check the data before putting it into the stringstre... (by Bench82)
Date Type
 
I have to create a Date Type for an online website that can store the date for a cart purchase date so on and so forth, im getting an error with it saying that ...
[4 replies] Last: ok i removed the cart_purchase_date default dates section in date.cpp ... (by zeratul554)
I'm stuck
 
I'm new to c++ and my latest homework is really confusing to me. Here is the exact problem: Create a program which will read from a file named "scores.txt"...
[2 replies] Last: Each line should be it's own statement? No loops or anything? (by Fraidy Levilev)
General Question About the & Operator
 
I have a general question about using the reference operator, &. I know that this gives us the address of whatever that follows it (e.g., &x gives us the addre...
[5 replies] Last: Thanks! That helps clarify things. (by skyline01)
by Lio
Array of strings
 
How can I figure how many elements is array of strings(the strings are diferent length Thanks
[1 reply] : I don't think you can. You will need to keep track of how many string... (by Stewbond)
by sinha
Access derived class members and methods from base class method
 
I am trying to solve for the root of a function in an interval [a,b]. class base { protected: float a, b; public: base () : a(0.0), b(1.0...
[3 replies] Last: I think what you are trying to ask is why can I not use the protected ... (by clanmjc)
March 2012 Pages: 1... 6364656667... 71
  Archived months: [feb2012] [apr2012]

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