General C++ Programming - April 2009 (Page 15)

Idea behind the Program and at the end is what I worte what am I doing wrong???
 
Can someone write this program!! Thanks I can not figure it out Write the C++ code that will contain 4 functions: 1. A void function named bestbuy that a...
[1 reply] : Never ask for a program , try doing something and ask if you get pr... (by Bazzy)
Is This Simple Calculator Coded Correctly? C++
 
1. Simple calculator - nothing fancy /**program description: * * simple calculator written for beginners. * This program asks user to enter an arithm...
[4 replies] Last: performCalculation(num1, num2, operatorSign); works as the template... (by Bazzy)
Storing data from a dataset to an array ASAP!
 
I have a problem storing data to an array. I know how to READ the array using <fstream>, but is there a way how to store it to array ? Please respond ASAP. I ap...
[1 reply] : I'm basing this code on the fact that the data your reading in are int... (by RockstarDerrick)
Function
 
Hay guys, this problem would be simple but cant quite figure it out. What this set of code is ment to do is: The user enters two numbers that they wish to rais...
[5 replies] Last: Try a left shift. something like: int answer = 1 << input; ... (by lostbits)
How to assign streams
 
I'm trying to assign references to an open stream, i.e. istream x, &y; x.open(); y = &x; // or y = &cin; // or something (Or something that works). ...
[4 replies] Last: Thank you firedraco . I will try your suggestion. (by lostbits)
find using multimap of multimap
 
Hi, I am trying to use multimap of multimap, because i would like to have multiple keys like multimap = value. this is happening if i use map. But when i use ...
[1 reply] : maybe you could make map of paired keys being the key. something like ... (by Gumbercules)
need this header file:sourceannotations.h
 
hello i installed visual studio 2008 but when i tried to buid a simple program it gave me this error: fatal error C1083: Cannot open include file: 'codeanal...
[2 replies] Last: Did you copy and paste a random chunk of code from the net. And it won... (by Mythios)
Dev C++compiler
 
Hello again, I've been meaning to start learning the c language some time soon and would like to know if the dev c++ compiler works for compiling c code. Ive lo...
[3 replies] Last: MinGW includes gcc (which is different from GCC), so you don't have to... (by helios)
error code C2440
 
/* Insert a new value into the list in sorted order */ void insert( ListNodePtr *sPtr, char value ) { ListNodePtr newPtr; /* pointer to new node */ ...
[1 reply] : ListNodePtr is apparently not a pointer, you need a * to make a poin... (by Gumbercules)
Ascii value
 
char s2 ; int i = 0; int buff = 's2 '; I am trying to copy the ascii value of characted in s2 to buff, but compiler gives error: "too many character...
[3 replies] Last: '' is not an operator, it is used for character literals. char let... (by Bazzy)
by Gregor
Executing data by a program
 
Hello I'm trying to program a self updating program that would just expand in place. I plan to use modules of code that will consist of instructions or resor...
[7 replies] Last: Yes, totaly. I'm looking into stuff to decide what my next project sho... (by Gregor)
by wretch
delegation, a simple C++ example anywhere?
 
Does anyone have a simple C++ example that demonstrates the principle of delegation? I'm not quite understanding the concept or where/how it would be used. ...
[no replies]
How does UpdateResource work?
 
I tried for several times to update a string table with UpdateResource in plain c++. But it didn't work. It looked like: hResource = BeginUpdateResource(pat...
[4 replies] Last: I tried to change a bit of this code to get it work with strings, but ... (by DolceMa)
Scientific Notation
 
Hi Im makin a program in c++ for chemistry conversions, but I'm having trouble with the scientific notation of a constant heres the code #include <iostream> //...
[7 replies] Last: Glad to help! Happy programming! :D (by Deimos)
template instantiation rule.
 
Hi everyone Consider the code snippet below.. class Employee { }; template <typename T> class EmployeeVector : private Employee { }; tem...
[2 replies] Last: Since derivation is used, when EmployeeOrderedVector< foo > is instant... (by jsmith)
#include problems
 
I have three header files (and associated cpp files as well, of course) like the following: calculator.h: #ifndef CALCULATOR_H #define CALCULATOR_H #in...
[3 replies] Last: Yes, that is the way it is supposed to work. In general, if all you... (by jsmith)
by ilyes
construction of class in a methode of a template
 
hi, suppose i have a template template <typename T> class loop{ public: isvalid(); T* getnext(); } suppose now the type of the template is a cla...
[1 reply] : Yes but you might specialize your template if the constructor if you c... (by Bazzy)
Improving Program
 
Hi again I've been going through my lessons and was wondering if was possible to execute and condition statement inside of a function such as float convert (...
[2 replies] Last: Here is a sample of a convert function (two implementations, one with ... (by closed account z05DSL3A)
Generate a Circle
 
Hi to all. I want to make a figure "Circle" with stars. I think i can make this with the help of for loop but not getting its logic. So plz tell me h...
[5 replies] Last: Try nested for loops, one for each axis on the screen. Then test each... (by seymore15074)
by wretch
code review, facade pattern
 
My class assignment is to implement a small facade pattern. In lecture we were told a universal remote control is a form of facade, since it allows a single in...
[3 replies] Last: thats what i was saying.. wait for more comments on this.. (by writetonsharma)
April 2009 Pages: 1... 1314151617... 20
  Archived months: [mar2009] [may2009]

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