Search:

Type: Posts; User: Zach_the_Lizard

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. fprintf(), IIRC, writes everything to a file. If...

    fprintf(), IIRC, writes everything to a file. If you want to read from a file, I believe you want to use fgets().
  2. Your if statements, to my eyes, are incorrect. ...

    Your if statements, to my eyes, are incorrect.


    if (date_c[ii] !(<"0" || >"9"))

    What does this statement mean? Nothing to me. Perhaps you meant something like this:



    if ( date_c[ii] <...
  3. Wow, 349 pages of documentation. Ouch. I think...

    Wow, 349 pages of documentation. Ouch. I think your professor is asking too much. Reading a TGA file might be more inline with "Intro to C++" than reading a ridiculously complicated file type.
  4. Replies
    15
    Views
    4,043

    I suppose one way you could do division is to use...

    I suppose one way you could do division is to use the basic long-division algorithm that we all learned at school. Another way to do division might be the Newton-Raphson method for division.

    The...
  5. Replies
    3
    Views
    1,207

    If I understand what you want correctly, you have...

    If I understand what you want correctly, you have a fixed area in which you can write text. Having never worked with the various console graphics libraries, I will make the assumption that the area...
  6. Replies
    20
    Views
    3,203

    I believe what you want is std::getline, not...

    I believe what you want is std::getline, not cin.getline. The cin version takes an array of chars, IIRC, while the std::getline version takes an input stream and a string. It optionally takes a...
  7. Whether your assignment was due in 2003 or 2009...

    Whether your assignment was due in 2003 or 2009 on October 2nd, it's still late.

    Anyways, let's assume you write each name on a separate line. All you'd need to do is this:

    ...
  8. I second the suggestion that you brush up on some...

    I second the suggestion that you brush up on some basic arithmetic. I would also second the suggestion you look into modulus. Here's a very suggestive hint:

    122 mod 10 = 2
  9. Apologies for the double post, but I've...

    Apologies for the double post, but I've successfully built the core Qt libraries using Visual Studio 2010 installed in the default path. This is how I configured it:

    configure -platform...
  10. I don't recall having any trouble building Qt...

    I don't recall having any trouble building Qt with MSVC express a few weeks ago. The configure and build script just worked right out of the box. I only have the 2010 beta of Visual Studio, so let me...
  11. Replies
    16
    Views
    5,377

    Aha! You have left out the truly best answer: GCC...

    Aha! You have left out the truly best answer: GCC for Windows. All other compilers are inferior in every possible way....*ducks*:p

    In all seriousness, if I were developing for Windows, I'd...
  12. Replies
    17
    Views
    2,425

    First off, fix your indentation. It's a pain to...

    First off, fix your indentation. It's a pain to have to read code like that. Second off, your scanf() function will do two things: Firstly, the way it is written now, it will not compile. Secondly,...
  13. Replies
    5
    Views
    2,531

    A C++ compiler in BASIC? I think that's...

    A C++ compiler in BASIC? I think that's sacrilege, or something worse.

    In any case, I think this TI Basic tutorial site might be right up your alley.
  14. Replies
    30
    Views
    3,922

    It appears to work OK from my testing, but I...

    It appears to work OK from my testing, but I would change it to inform you it's wanting your input. I also prefer seeing stuff in radian measure than degrees, but that's just me.
  15. Replies
    30
    Views
    3,922

    Pi is a mathematical constant. 3.14159..... ...

    Pi is a mathematical constant. 3.14159.....

    Just follow what Epy said, and you shouldn't have any trouble getting the angle to your target.

    EDIT: Check this page out for more on PI:
    ...
  16. Replies
    16
    Views
    2,176

    It's been a while since I've used SDL, back...

    It's been a while since I've used SDL, back during the dark days when pointers were terrifying beasts that caused programs to crash, compiler errors were written by an alien race, and comments for...
  17. Replies
    25
    Views
    2,772

    You can probably use a regular expressions...

    You can probably use a regular expressions library to find a specific tag. The new C++ standard will have a Regex library, which is actually the Boost.Regex library. VS 2010 probably has it, and GCC...
  18. Replies
    16
    Views
    2,176

    It depends on what sort of graphics library we're...

    It depends on what sort of graphics library we're talking about. If we're talking about 3D, you have a variety of choices, such as DirectX (Windows only) or OpenGL (cross platform) or SDL (which uses...
  19. Replies
    25
    Views
    2,772

    I don't think it'd be so horrible if he's looking...

    I don't think it'd be so horrible if he's looking for, say, a specific tag, such as <ul>. It's certainly doable, considering Webkit and Gecko are written in C++, and they have to do far more than...
  20. Replies
    20
    Views
    4,379

    Another thing you can do with C++0x lambdas is...

    Another thing you can do with C++0x lambdas is have local functions within your function. You could do something like this:



    #include <iostream>
    #include <vector>
    #include <functional>
    using...
  21. Replies
    9
    Views
    2,072

    You could try using Qt Creator, which they...

    You could try using Qt Creator, which they probably have for Mac OS X. If projects in that don't work, then something got screwed up during install or something.
  22. Replies
    21
    Views
    2,270

    The last printf statement has an error. It's not...

    The last printf statement has an error. It's not one you would think of right of the bat, but the string is broken up into 2 lines, and it treats it as though each line is a totally separate...
  23. Replies
    21
    Views
    2,270

    I would use a for loop. Just have it start at 100...

    I would use a for loop. Just have it start at 100 and end at 70.
  24. Replies
    21
    Views
    2,270

    That would be one of your (potential) issues,...

    That would be one of your (potential) issues, yes. The other issue is previously mentioned: sum /= 2 might be okay, but then you went ahead and put it in a for loop. It will continuously divide the...
  25. Replies
    35
    Views
    4,248

    You're right about arctan(x), and right about...

    You're right about arctan(x), and right about sin(x), but wrong about sin(atan(x)).

    -(x^2/(1 + x^2)^(3/2)) + 1/sqrt(1 + x^2) is the derivative. You have to use the product rule and the chain rule
Results 1 to 25 of 63
Page 1 of 3 1 2 3