Search:

Type: Posts; User: roktsyntst

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Thread: Use of DLLs

    by roktsyntst
    Replies
    7
    Views
    1,351

    The fact that DLL's can be written in C++ implies...

    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]...
  2. Replies
    24
    Views
    20,633

    Won't that still work (on windows), as long as...

    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(...
  3. Replies
    6
    Views
    4,655

    I can understand why it would call the parent's...

    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...
  4. Replies
    30
    Views
    15,799

    A char is a single character. A char* is a...

    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) )....
  5. Replies
    11
    Views
    2,990

    On a side note, if you don't mind my asking, what...

    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...
  6. Replies
    11
    Views
    2,256

    Re: Use the force... uh... I mean the library.

    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...
  7. Replies
    30
    Views
    15,799

    I think it's unlikely that's the reason. const...

    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?
  8. Replies
    30
    Views
    15,799

    I'll answer what I can... strFileFilter is...

    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...
  9. Thread: Structures

    by roktsyntst
    Replies
    4
    Views
    1,079

    I believe you've defined what a NewQ is, but you...

    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:

    ...
  10. If your divisor is linear, you can use synthetic...

    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...
  11. Replies
    3
    Views
    1,531

    Interesting, why is this? I thought that this...

    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?
  12. Replies
    1
    Views
    1,385

    This is probably overkill, but you could take a...

    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.)
  13. Replies
    7
    Views
    1,866

    That's (part of) what classes are for. Write a...

    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):

    ...
  14. Thread: typecasting

    by roktsyntst
    Replies
    14
    Views
    2,004

    But would they let you store a variety of...

    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...
  15. Replies
    16
    Views
    2,843

    system() is bad because it's slow and...

    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...
  16. Thread: typecasting

    by roktsyntst
    Replies
    14
    Views
    2,004

    What about data structures (like a stack) that...

    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...
  17. Borland, libraries, and template member functions

    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...
  18. Replies
    12
    Views
    1,348

    As I understand it, C standard headers (including...

    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...
  19. Replies
    4
    Views
    1,646

    It depends on what you're doing. The only time I...

    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...
  20. Thread: ARg!

    by roktsyntst
    Replies
    18
    Views
    2,599

    The getline using ',' for a delimiter was my...

    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...
  21. Thread: ARg!

    by roktsyntst
    Replies
    18
    Views
    2,599

    First, look up std::getline(). It takes three...

    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...
  22. Thread: ARg!

    by roktsyntst
    Replies
    18
    Views
    2,599

    The actual code would take a little testing to...

    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...
  23. Replies
    8
    Views
    1,961

    Not necessarily, exactly. Its syntax is supposed...

    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...
  24. Replies
    8
    Views
    1,525

    vVv: you implied that most of this doesn't apply...

    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...
  25. Like the Dog said, there are two possibilities,...

    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...
Results 1 to 25 of 56
Page 1 of 3 1 2 3