Beginners - November 2008 (Page 16)

Non-lvalue in Program Question
 
Hello, The errors are at the bottom of the post, and they are about the error: non-lvalue. I am writing a program which allows the user to choose a beverage, ...
[2 replies] Last: Yes, that fixed it. Thank you, Melkiy! (by thekautz)
by RDH37
Binary Tree question
 
Iv been trying to understand programing of a binary tree from the code I found here. http://www.cplusplus.happycodings.com/Algorithms/code5.html I'm confused...
[3 replies] Last: Alright I understand it now, thanks. (by RDH37)
Why use enum instead of integral?
 
I've been playing around with enumerators the past couple of days. Would some one mind telling me what the real world application of enum is? So far I fail to...
[2 replies] Last: It's only real application is to enforce a bit of type safety, though ... (by jsmith)
Validation in a function
 
Im writting a program for my class, i pretty much have it figured out and is compiling properly, but when a character is imputed instead of a floating number, t...
[1 reply] : Look here: http://www.cplusplus.com/forum/beginner/4566/#msg20182 (t... (by Bazzy)
type_info as argument
 
void func(type_info ti) { [...] } int main() { func(typeid(Ball)); } error: within this context 1>main.cpp(151): error: initializing argument...
[2 replies] Last: Thanks, it works!! void func(const type_info & ti) { [...] } ... (by cppuser7)
Prime numbers
 
Hi guys, I bring a difficult problem this time (at least for me) :D check this out, I made a calculator to operate with fractions, which also simplifies the ...
[4 replies] Last: So the way you use my function is like this: cout << GCD<12,6>::... (by jsmith)
by roblf
C++ class pointer initialisation
 
I'm an experienced C and Java programmer already, but I am using C++ for the first time. I am constantly encountering a problem which seems very simple, but I ...
[5 replies] Last: Hi everyone, thanks for all your replies. Yes, it was me just being a... (by roblf)
Artificial intelligent
 
Hi to all! I am new in C++ and i want to introduce in AI, with the simple perceptron. Would you like to help me to work in this new proyect? I know that is no...
[2 replies] Last: This is a very ambiguous question. AI refers to many things, please ex... (by Umz)
How to write a program to generate the elctricity bill?
 
I am not able to generate a correct program for the electricity bill.I also don't know how the program will work. Is there anyone who can help me out with my ...
[1 reply] : Please post your non-working code. We won't do your homework for you.... (by jsmith)
fscanf question
 
I want to use fscanf read some variables from a text file but I have some problems. The string format in the text file is like below(I can use any delimiter ...
[9 replies] Last: fscanf returns the number of "matches" made (ie, in your case, the num... (by jsmith)
How to use loop in c++
 
Please help me because i dont know how to use and also Why is it used for?
[1 reply] : In C++ are many types of loop. Read a bit of this http://www.cplusplu... (by Bazzy)
overloaded functions question.. is this correct?
 
My instructor gave us a review for a test we have tomorrow and I'm looking at a problem and it doesn't make sense.. Can someone let me know what they think? The...
[1 reply] : For a start: Your functions are only different in the return type -... (by guestgulkan)
Arrays to read inventory file
 
This is what i have so far.I need to print a report and the data must be read with arrays. data must ptinted similar to: Month: March Item Begin q...
[15 replies] Last: thank you (by Prada8787)
save memory address into an int
 
Hi, I think this problem should be pretty easy, but I can't find the answer anywhere. In my assignment we have to get the address of a private class member str...
[9 replies] Last: Thanks for confirming my recollection, Duoas! Good to know I wasn't... (by jsmith)
Tree in Data structures
 
#include <iostream> #include <string> #include <cstring> using namespace std; class treefun; class treeNode { friend class treefun; private: ...
[9 replies] Last: From the tutorial on this site: Null pointer A null pointer is a ... (by Scipio)
Changing a function from single linked to double linked
 
I need to make a double-linked list. I have code for a single-linked linked list. example code(single-linked): void Network::push_front(int e, string i, s...
[no replies]
Making an Aimbot
 
I want to make an aimbot for a game and from what i gathered about making one i need three things to make it work: A. My Position B. There Position C. The...
[4 replies] Last: I see, well i suppose its worth a shot anyway. but thats good to know ... (by LovestoCpp)
How to read from an input file with various types
 
I have an input file that looks like this: Last Name, First Name Number Number Number and continues for 25 lines I need to extract the Last name, first n...
[1 reply] : I would probably use getline() and then use the string functions to se... (by firedraco)
Cant figure out error w/ passing values between functions!
 
#include <cstdlib> #include <iostream> using namespace std; bool funcLetter(int num); int main() { int num; int x; cout<<"Enter a number...
[2 replies] Last: thanks alot! it worked right away! (by bostonsox015)
Why is this an infinite loop...?
 
I hope this isn't too much code for anyone to skim through, but basically the first and second function are to move the position of the 'tortoise' and the 'hare...
[7 replies] Last: Surely what you want instead of 'and' (or '&&' as is better known by m... (by o0OpsyphiO0o)
November 2008 Pages: 1... 141516171819
  Archived months: [oct2008] [dec2008]

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