Beginners - October 2010 (Page 34)

by meca
Filestreaming--wordguard
 
hi again! I have a project about filestreaming and I am a beginner in c++. Anyone who can help me improve my code. cat dog fox --- test ---fi...
[no replies]
one dimensional 8 queens problem
 
Hi I am working on 8 queen problem using a one dimension without backtrack. my programs prints a infinte loops and none of them are real solutions. can someo...
[3 replies] Last: So you just change b to b (very likely to return true) What you mea... (by ne555)
Taking a text file and assigning the individual lines to a class
 
I am trying to take a text file with names and addresses and place them into already created classes such as Name and Address( Street, city, state, zip code). M...
[6 replies] Last: vector<char> can only store that many. I look at his input file I feel... (by sohguanh)
by eri24
Simple Game
 
I'm taking an intro to computer science class. We have to write code for a 2 player game. This is the game: There are three stacks (A, B and C) of sticks on the...
[4 replies] Last: Did your professor teach you pseudo code, flow charting, or grammars? ... (by nathan10)
Does this seem right?
 
Does this seem right?? Because if it is than I'm pretty much got Operator Overloading down. class Person{ friend bool operator&==(Person &prs){ if (*t...
[4 replies] Last: Yes I see that now. (by Analyzer)
by areid
Power Functions
 
Hi I am having trouble using the power function for integers, I need the result to be an integer number. I'm trying to get the user to type in both the values o...
[18 replies] Last: I 'm not sure that 'pow' function will accept just int (as indicated ... (by AlphaBravo)
Configuration value and password system
 
Hi Cplusplus forum coders! My assignment is to extend the class I wrote in Assignment 2 (code below) by reading the configuration file provided and enforcin...
[1 reply] : Bump! (by acerious)
const string declaration
 
im working on a poker game and im trying to declare and initialize strings to represent card faces/suits and im getting some very strange erros such as... f...
[11 replies] Last: yeah but i put using namespace std; so it should work fine shouldnt it... (by L E G I O N)
Practice on Exceptions (1,2)
 
Can someone start this code off for me so that i can see how its done? This is one of the practice problems but i would like to get as much practice as i can wi...
[24 replies] Last: You need to finish this: int computeAge(int currentYear, int bir... (by Galik)
Having trouble with functions
 
Hello I'm trying to write a program that computes miles per gallon by,writing a function that computes miles per gallon a sample output of this goes like this ...
[1 reply] : Your prototype on line 7 does not match line 30. (by jsmith)
Input Validation
 
Can anyone help me with a bit of code that will validate the input from a user? I know that cin.fail() works for most cases, i.e. float i; cout << "p...
[1 reply] : Get the entire input into a string, then use a stringstream to get it ... (by firedraco)
Big C++ lab solutions
 
Does anyone know where the Big C++ lab solutions are? Can you provide me with a link?
[15 replies] Last: swalton, why don't you try an alternative method to learning? Try sett... (by closed account S6k9GNh0)
nested function
 
Hi! Is there a concept of nested function in C++? eg:- class X { void input() { void disp() { code; } code; } }; i'll call input() in the m...
[1 reply] : No. (by jsmith)
Need to exclude non-chars, need assistance
 
I'm writing a program for my CS class and I need the program to display an * when something is entered that's not a character. I've tried a lot of things bug ca...
[6 replies] Last: My teacher told me that when you read in ' ' you have to print out a ... (by skatingrocker17)
adress of operator on array
 
Good day everyone ! I believe I'm confused with the use of the address-of operator in two distinct cases, Let me clarify: int num = 10; int *p = &num; ...
[3 replies] Last: Thank you guys, your explanations have solved my doubts. I kind of... (by joseplusplus)
by Hyena
pseudo-random number generator without rand
 
Hello! I have a serious problem with my C classes. I need to make a pseudo-random number generator WITHOUT using rand or srand. Do any of you have idea how ...
[1 reply] : http://www.eternallyconfuzzled.com/tuts/algorithms/jsw_tut_rand.aspx (by naivnomore)
reading variables off of txt file
 
Hi, I have a list of data I need to compute in a text file. The data is formatted like so... " Run 141572 event 2 m1: pt,eta,phi,m= 243.862 0.363307 1.143...
[1 reply] : It isn't hard if format is constant. First line is very simple. I don... (by hamsterman)
Absolute value round
 
I'm working on a project right now assigned by my professor. It involves a DateTime object that takes gregorian calendar and converts it to Julian Date, and vic...
[2 replies] Last: Thank you. All I needed to know was abs from the cmath library. (by workman845)
can you make cash mashine?
 
i want to make a program with a menu system that will ask user name and allow the user to diposit,withdraw, and view statements of the diposited and withdrawed ...
[2 replies] Last: This is how you do it: #include <cstdio> #include <cstring> #inclu... (by hamsterman)
Destructor
 
#include<iostream.h> #include<conio.h> int c=0; class num { public: num() { c++; cout<<"Object : "<<c<<endl; } ~num() { cout<<"Object r...
[7 replies] Last: Ah yes, you should change the snippet int num::c = 0; to: unsigned ... (by Kyon)
October 2010 Pages: 1... 3233343536... 42
  Archived months: [sep2010] [nov2010]

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