The fact that DLL's can be written in C++ implies a relationship. The OP never implied that relationship was exclusive.
I think the question still stands - are DLL's very common in C++ [Windows]...
Type: Posts; User: roktsyntst
The fact that DLL's can be written in C++ implies a relationship. The OP never implied that relationship was exclusive.
I think the question still stands - are DLL's very common in C++ [Windows]...
Won't that still work (on windows), as long as your pwd is '.' (relative to the exe)?
i.e.
string destination = "wherever\\you\\want"
string foo = "copy "+ argv[0] + destination;
system(...
I can understand why it would call the parent's copy anyway, because the child hasn't been defined yet. But is it really because it's a base class pointer? I thought that was the whole point of...
A char is a single character. A char* is a pointer to a character, which usually represents an array of characters (which is a string (but not the std::string object, just another type of string) )....
On a side note, if you don't mind my asking, what are you doing? It looks much like something I started a few weeks ago but lost interest in...I was modeling the major mathematical functions, but I...
Raise 0.5 to the 24th power, and take the 10th root (or the 12th power and take the 5th root, etc.). Use your home-built recursive function for the raising, but alas the only way I ever figured out...
I think it's unlikely that's the reason. const char* and char[] are nearly equivalent (for 95% of cases, they are). What exactly is the error?
I'll answer what I can...
strFileFilter is a std::string, which is a standard class that simplifies manipulation of character strings. But most of the Win32 API functions take char* (C-style...
I believe you've defined what a NewQ is, but you haven't created any yet. i.e., somewhere after your structure definition, say:
NewQ theQuestion;
And then access members using:
...
If your divisor is linear, you can use synthetic division. I believe there are techniques for nonlinear divisors (i.e. for a quadratic, divide once each by two linear factors). The algorithm isn't...
Interesting, why is this? I thought that this wasn't the case for local var's because C++ didn't want to force you to do that (inefficient), but why would they do so for globals?
This is probably overkill, but you could take a look at a SimpleTime class I wrote. (I'll try and post the code on that page when I get to it, until then you can download it.)
That's (part of) what classes are for. Write a [template?] class to do exactly that. You'll probably want to overload at least the operator[], but it should be easy. Sample (untested):
...
But would they let you store a variety of different objects? For example, std::map is a template that lets you store a list of any kind of object, as long as each one is the same. What if you wanted...
system() is bad because it's slow and non-portable. What it does is run whatever command it takes as its paramater as though you typed it into the shell (try typing "pause" into the shell to see for...
What about data structures (like a stack) that store generic data (like void* pointers), which (for example) allows you to store heterogenous lists of items? In order to do anything useful, you'll...
I'm writing a class that contains several template member functions (but it's not a template class). I know that because of this, I cannot do what I normally do, which is to write the class...
As I understand it, C standard headers (including stdlib.h) are best used in C++ by dropping the ".h" and putting a "c" in front of it. This also puts the functions into the namespace "std". Although...
It depends on what you're doing. The only time I ever "use" an entire namespace ("using namespace std") is for quick testing programs, because I don't think it's a good idea. As you probably guessed...
The getline using ',' for a delimiter was my suggestion because I figured if you knew that the file always contained something like "some_data, some_other_data, some_third_data" on each line, you...
First, look up std::getline(). It takes three parameters: the input stream, the destination (using a string would be your best bet), and the delimeter (optional, because it defaults to '\n').
For...
The actual code would take a little testing to work out the details, but the basic idea would go like this:
vector<student> theStudents;
while(!END_OF_FILE) { // using whatever EOF test you...
Not necessarily, exactly. Its syntax is supposed to resemble that of a variable declaration. Think of these:
char foo[5];
typedef char bar[] // the example in question
foo's type is a...
vVv: you implied that most of this doesn't apply to MacOS. How is it different? I'm just curious.
Also, if each program has its own memory space, and they may map differently, does this mean it's...
Like the Dog said, there are two possibilities, and you will have to cover both. As I understand it, that's basically saying
class1.operator=( class2.operator-( class3 ) )
You'll have to...