Beginners - November 2011

by vizion
problems using zzzzzz as sentinel
 
I am having problems using a value of zzzzzz as a sentinel. Here is my assignment: "Write a program to process weekly employee time cards for all employees of...
[2 replies] Last: Thanks! (by vizion)
Class definition
 
Can anyone help me find whats wrong with this class definition looks fine to me class Cohort { public: Cohort(); void insert(Student x); private: ...
[7 replies] Last: Yes, none will work. marks has to be initialized on the constructor.... (by bbgst)
Using Vectors with Class
 
So I just started working with Objects and am now transition from using arrays to vectors, and to be honest I am completely lost. I need to create a program tha...
[1 reply] : int Read (ifstream&, vector<>&) The two parameters of your function... (by Catfish)
problem with making function
 
void read_player1_hand(ifstream& in_stream, string& card_value ,string& card_suit ,int max_length) { char next_char; while(!in_stream.eof()) ...
[8 replies] Last: thanks again (by bbathel)
by SC100
Please help “Master Mind” Project
 
I am new to c++ and had a professor switch. The new professor assigned this project and we cannot figure it out. For this project, you will write a C++ pr...
[1 reply] : Here is an update #include<iostream> #include<cstdlib> #include<ctim... (by SC100)
Reading a text file
 
I am just starting off with C++ and I am very lost! I have to read a dat file that has rows of numbers in four different columns. I just don't understand how it...
[5 replies] Last: As far as I know all data files are read in as one line, if you want t... (by Yellowhottub)
saving a bool variable and using it in an if statement
 
const bool IS_CARD_VALUE=(next_char=='a'||next_char=='A'||next_char=='j'||next_char=='J' ||next_char=='k'||next_char=='K'||next_char=='Q'||next_char=='q' ||...
[11 replies] Last: okay thanks again. (by bbathel)
Keep getting zero
 
I'm trying to write a program that simulates the rolling of dice. The program should print out the percentages of each time a 2-12 was rolled. However the issue...
[3 replies] Last: Check line 74. That's where the flaw is. (by wjee0910)
by EmniTy
First program(Calculator) Please help!
 
Well, I'm trying to make my first program, in this case a calculator. But when i run it, i enter the first number, and then (per example) - and then it closes....
[9 replies] Last: tyvm for ur help :D, it works perfect now. (by EmniTy)
by sloooh
please...can you help me
 
Hi guys,I am so happy to find a such Great website about c++, and i hope from all of you to help my to find a solution to my assignment. >>the assignment is: w...
[7 replies] Last: Thank you all for the help . the code is working But Can You make it s... (by sloooh)
by Grux
wxsmith help
 
Hi, I'm writing a somewhat small game (RPG style) and I have been using C++/wxwidgets with wxsmith under CodeBlocks. How do I make a button in one frame open u...
[no replies]
i need help
 
okay i was wondering would anyone or someone can spare some information on how to code a European roulette table in a function. the colors don't have to be in t...
[no replies]
Can't get file content with fopen()
 
This is strange I have this code: long len; FILE *fp; if ((fp = fopen("data/settings.stg", "r")) != NULL) { fseek(fp, 0, SEEK_END); len = ftell(fp); ...
[1 reply] : Solved, I need the absolute path (by alexbnc)
Need help returning two values from a function
 
I'm doing the ever so popular quadratic equation and the topic I saw on here didn't use functions to solve it. I can only get the function to return one of the ...
[4 replies] Last: fixed it thank you Moschops void quadraticEquation(double var1,doub... (by Kdobie13)
Does Anyone know how to reference a 2D string array in a function?
 
So everything works fine for the most part, but I don't know how to use a 2D array as a reference. Any help would be much appericated. What I currently have:...
[4 replies] Last: Forgot to mention, to pass or return an array pointer, better use a dy... (by wjee0910)
by SonyaK
Defining, Implementing, and testing a class?
 
Hi, I've been working on this for over a week and I still can't get it right. I'm supposed to define a class to represent a date with 3 data members (month, d...
[14 replies] Last: Thanks for the reply! Ok, added that semicolon. Thanks! Actually, I... (by SonyaK)
Can a function return any type of result?
 
Hi everybody I have a question for you. Can a function return any type of result? What I mean is if it can return an integer, or a char, or a boolean, dependin...
[5 replies] Last: Can't you store the setting values as strings and when you read it you... (by Peter87)
memcpy (1,2,3)
 
Hello, While trying to do some micro-optimization of my code, I came across the memcpy function. Since part of my code involves copying "large" arrays of int...
[43 replies] Last: Yeah, I fixed it already. I was dividing N inside the loop. (by helios)
Question about function pointers in classes/structure
 
I have a structure called mystruct , into which I would like to place a function pointer called pf , which points to a function that takes a float as input, a...
[5 replies] Last: according to GCC, both pf = &r_routine and pf = r_routine are equival... (by Cubbi)
by Edalat
Help meeeeeeeeee!
 
Hi my friends. I writing a new program,but this program have many errors. can you help me to remove the errors. #include<iostream.h> int calc2str(char str1...
[3 replies] Last: First off a title name like "I'm stuck on (put your problem here)" wou... (by bboy212)
November 2011 Pages: 123... 65
  Archived months: [oct2011] [dec2011]

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