>how do I give the correct number of answers?
-start with something to keep a count (an integer)
-every time the user answers correctly, increment the counter.
-at the end, display the final...
Type: Posts; User: sh3rpa
>how do I give the correct number of answers?
-start with something to keep a count (an integer)
-every time the user answers correctly, increment the counter.
-at the end, display the final...
many thanks CornedBee, I think I've worked it out so I can use only one kind of object with this workaround:
The 8 "key" elements are only chars anyway so they don't need to be different data...
FULL PROBLEM:
-chars are read from a file "atext.txt"
-an initial key value is set (this defines the first sub-key of many depending on how large the text file is)
-this key defines a trig...
I don't care what anyone says,
C/C++ created the WORLD!!!
>was wondering if I would need to learn C++?
uh let's say yes for that one!
would it be bad to use an array and also an inheritance scheme on the data types so it could handle the two different types (there won't be more than two different types)?
As an example I have an array w/dimensions 8X8
The elements of this array contain objects with a char value and a hash-key value except for 8 of these 64 elements.
I want these 8 elements to...
I know a lot of people here are using boost and often refer to it in their answers to posts. I do the bulk of my work on my windows xp laptop w/dev c++. I'm interested in using boost but I can't...
ok, i guess it's pretty inefficient to create another object just to limit the values so uhh nevermind.
are you trying to use your project files (.dev) files in MSVS?
That might give you that error.
Listen to Salem, see what he's done for you?
He's basically starting a process that you would benefit greatly from....
PSEUDO-CODE!!!
(if you can't develop the pseudo-code for this simple a...
I'm trying to create a coordinate system for a half-sphere object.
The values need to range (in degrees) from -90 to positive 90 both horizontally and vertically.
Creating this coordinate...
#include<stdio.h>
#include<stdilb.h>
#include<time.h>
are those the headers your teacher has asked you to use? kinda fishy...
also:
// we prefer:
I'm no expert on the subject, but perhaps your PATH variable is having a conflict?
How about this?
class MyClass{
public:
MyClass& operator=(const MyClass& rhs){
MyClass* temp = new MyClass(*rhs.m_ptr);
I want to know how to write the deep copy (what is being pointed to)
If I think back to my template linked list class, the value in each node was copied using this method:
for(Iterator i =...
I'm guessing that this whole copying business really only applies to pointers right?
For my example I'll assume that the copying is only one to one (no arrays or linked-lists)
Does that mean...
thank you laserlight, but then how DO you write them to get the DEEP copies?
I understand the difference between the copy ctor & the assignment operator and when each is used
SomeObject object2(object1); // This calls the copy ctor
SomeObject object2 = object1; //...
A deck of cards contains 52 cards (4 suits, each w/13 different values).
Write a menu-driven program that can:
1. Shuffle the deck of cards.
2. Deal out any number of equal amounts of cards to...
worked like a charm! thanx!
I'm having trouble w/writing the definition of functions that return an Iter
template <typename T> Iter
List<T>::insert()
/* etc */
}
si, muchos gracias
(my spanish is about as good as my french!)
Nevermind, I got it straightened out.
Is that make iterator a friend class of list?