Beginners - October 2012 (Page 60)

How could this be better?
 
I want to use functions wherever possible in my code below, but to be honest I don't know how to use functions without using global variables which I do NOT wa...
[6 replies] Last: For small programs you usually write function prototypes before main, ... (by maeriden)
explicit destructor
 
The code below is working fine but i would like to know that the representation of destructor is correct way or not?? I think it would be sort of recursion in...
[7 replies] Last: which uses an allocator to encapsulate the placement new. I find p =... (by ne555)
infile eof explained.
 
while(counter) { infile>>word; count++; if(word == "..") break; } cout<<"Successfully scanned!"; cout<<...
[1 reply] : while(infile>>word) ++counter; (by ne555)
Yahtzee program trouble
 
I have to make a Yahtzee program for class. what i have so far is down below. it is basically finished except that i cant get the ones through sixes to display ...
[1 reply] : Notice I havn't tested this but something like this should help for... (by ryancb06)
Can't get object values to print
 
I am trying to go through a .csv file of numbers and create a singly-linked list using object values as pointers. The code is free of syntax errors and it comp...
[no replies]
having trouble with exercise please help.
 
I am completely lost. I dont know if i'm using the correct format for this program. This is just an excerise program. I'm studying and I can't seem to figure th...
[3 replies] Last: Thanks for your help!! I think my program works now. I was having such... (by ariana2608)
Assignment help, functions.
 
My assignment is this. The purpose of this assignment is to reinforce the concepts types, I/O, and the process of decomposing problems into smaller units that ...
[13 replies] Last: But still, Vlad was correct, the condition (j >= 5) is evaluated to se... (by Chervil)
multimapping
 
Hey guys I have a problem with my program, I am trying to read in a grammar putting multiple right hand rules to a left hand rule using multimapping. The thing...
[no replies]
by kgor93
Need help with array program for C++ class!
 
Deleted for privacy.
[7 replies] Last: Restated for reference. Ok, so I'm working on a lab for my C++ class... (by Moschops)
(*this) pointer
 
class myString { .... .... void format( const char *fmt, ... ) { char buffer[ 10240 ]; va_list alist; va_start(alist, fmt ); vsprintf( buffer, ...
[1 reply] : Let a is an object of class A. In this case *this is equivalent to a. ... (by vlad from moscow)
Invalid Conversion from const char to char
 
This is the code of the program I'm creating #include <iostream> #include <cmath> #include <fstream> #include <cstdlib> using namespace std; struct pl...
[4 replies] Last: oh. Yeah, should've though of that. Thanks for the help! (by bosox99)
Output & Computation Errors
 
Hey Everyone, So I'm trying to get the width, depth, and height of 5 boxes, and then using these dimensions to determine each box's volume. Any help would be...
[12 replies] Last: My problem is that once I get the local max and min X's and Y's for ea... (by ilovelearning)
Hailstone sequence.
 
I need to write a code that takes (n) and generates n sequences of numbers (1 to n) and finds the next number starting at one according to these rules: if a...
[1 reply] : See my comment in your previous thread. (by vlad from moscow)
Help with Solving Errors
 
I am compiling a .cpp called SymbolTable. I get a lot of errors, but most of them are the same error, stemming from a problem in the header that I can't solve. ...
[6 replies] Last: Also, the second part of your first post, SymbolTable::SymbolTable ()... (by Aceix)
Accessing plugin-devices
 
Quote from http://www.cplusplus.com/reference/clibrary/cstdio/ cstdio (stdio.h) C library to perform Input/Output operations Input and Output operations can al...
[1 reply] : bump (by newbieg)
Please help! if-then-else structure, assignment for intro to c++
 
I'm new to C++ and currently enrolled in an intro class. Due to some uncontrollable events I have fallen behind in the class. Would appreciate help with the fol...
[2 replies] Last: Was stressed out because I'm playing catch up. I'll see what I can com... (by dany91307)
Need algorithm for this pseudo code... Please help.
 
Output "enter 1st digit" 2- input x 3-output "enter 2nd digit" 4-input y 5-if operator =+ then x+y=z 6-else if operator = - then x-y=z 7-else if operator ...
[1 reply] : (dont get me wrong but) this already looks as pseudo code to me :) Ps... (by codewalker)
"Invalid conversion from const char* to char*"
 
Hi all, this is my code: #include <iostream> template < typename Var, typename Value > void Store( Var& var, Value value ) { var = value; } ...
[5 replies] Last: Well, there's two options: 1) Copy " value " into " var " using " str... (by closed account zb0S216C)
by xoden
array of both string and int
 
How do i make an array with one column string and one column int? this is kind of a homework question, but the actual homework part is sorting the info and u...
[2 replies] Last: You can't store two types inside the same piece of memory such as an a... (by closed account zb0S216C)
'sh: Pause: Command not found' Error and input/output file won't open
 
I need some direction with the following program. It is called star search. When I try to run the program, I keep getting the following error message: 'sh: paus...
[1 reply] : First thing, please post your code encased with tag, its much easier... (by codewalker)
October 2012 Pages: 1... 5859606162... 84
  Archived months: [sep2012] [nov2012]

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