Search:

Type: Posts; User: Lithorien

Page 1 of 13 1 2 3 4

Search: Search took 0.02 seconds; generated 18 minute(s) ago.

  1. Replies
    10
    Views
    4,770

    Oh yes there is. Project Properties > C/C++ >...

    Oh yes there is. Project Properties > C/C++ > Advanced > Compile As. You have a choice between C++ code (/TP) or C code (/TC).
  2. I'll actually point you here: Download details:...

    I'll actually point you here: Download details: Microsoft Visual C++ 2010 Redistributable Package (x86)

    This is the Visual C++ 2010 redist package. It gives users the ability to run applications...
  3. Replies
    8
    Views
    1,971

    I'm going to give you your program, re-written to...

    I'm going to give you your program, re-written to be a lot cleaner and less clunky. You were heading in the right direction, but I think your thought process wasn't quite grasping what you needed to...
  4. Well, I can answer one question: Look at your own...

    Well, I can answer one question: Look at your own code. The grid is set up with the series of if...than checks you have when you parse the random value. For example, in the block:


    if (k ==1 ) //...
  5. Well, think about it logically. If you've got an...

    Well, think about it logically. If you've got an array, say grades[5], what do you know about C and arrays that will make walking it a little easier? (Think pointers!) As for calculating the high and...
  6. Oh please don't teach "using namespace std"....

    Oh please don't teach "using namespace std". That's a wonderful way to pollute the global namespace.

    Try "using std::cout", "using std::endl", and "using std::cin" if you have to use a using...
  7. Replies
    5
    Views
    1,375

    Hahahahahaha, no.

    Hahahahahaha, no.
  8. Replies
    65
    Views
    15,718

    Hahahahahaha, we WHAT? We went into a soverign...

    Hahahahahaha, we WHAT?

    We went into a soverign nation, took down the government that - while run by an evil man - provided stability to the region, and allowed three warring factions free reign on...
  9. Thread: I'm New...=(

    by Lithorien
    Replies
    46
    Views
    9,057

    Ok, let's psuedocode a function for you and see...

    Ok, let's psuedocode a function for you and see if it makes sense.


    ContainsLetter(Word, Letter)
    {
    int Positions[Word.Length];
    int SearchIndex = 0, PositionsArrayPositionCounter = 0;
    ...
  10. Replies
    65
    Views
    15,718

    ...I'd like to apoligize for this gentleman, on...

    ...I'd like to apoligize for this gentleman, on behalf of the rest of us living in the United States. I swear, not all of us have our heads inserted directly up our rear ends. :(
  11. Thread: I'm New...=(

    by Lithorien
    Replies
    46
    Views
    9,057

    To find if the letter is in the word, you want to...

    To find if the letter is in the word, you want to use std::string::find(). You're probally going to end up stuffing it in a loop so you can return every occurance of the letter in the word, unless...
  12. Replies
    6
    Views
    2,122

    In your Solution Explorer, right click on the...

    In your Solution Explorer, right click on the Resource Files folder. Go to Add, then New Item. Select the category Resource, then pick Resource File.

    That'll do the automagical inclusion for you....
  13. Replies
    17
    Views
    2,719

    Ah, sorry. :)

    Ah, sorry. :)
  14. Replies
    13
    Views
    2,005

    And yet......

    And yet... http://forum.java.sun.com/thread.jspa?threadID=5155847&messageID=9589354

    Similar problem, different results. Just because one implementation of one language does it one way doesn't mean...
  15. Replies
    13
    Views
    2,005

    ...Yes, and that's Java. Not C. Different rules...

    ...Yes, and that's Java. Not C. Different rules in effect.
  16. Replies
    13
    Views
    2,005

    It's entirely possible that your particular...

    It's entirely possible that your particular implementation has decided that "i++ + ++i" is treated like PHP, and is doing a right-to-left evaluation of that statement. Meaning, it increments I...
  17. Replies
    17
    Views
    2,719

    ...wouldn't it just be sizeof()?

    ...wouldn't it just be sizeof()?
  18. Replies
    13
    Views
    2,005

    ...Isn't that operation undefined to begin with?...

    ...Isn't that operation undefined to begin with?

    http://zamanbakshifirst.blogspot.com/2006/11/c-whats-value-of-i-i.html
    http://www.research.att.com/~bs/bs_faq2.html#evaluation-order
  19. Thread: C++ Telnet

    by Lithorien
    Replies
    8
    Views
    10,600

    You would have to write your own telnet-style...

    You would have to write your own telnet-style application. To do this, you'd want to start learning about WinSock, and how to emulate different terminal types if you're going to emulate that...
  20. Thread: C++ Telnet

    by Lithorien
    Replies
    8
    Views
    10,600

    Short answer: No. Long answer: Nope. Longer...

    Short answer: No.

    Long answer: Nope.

    Longer answer: No, because when you do the system() call that you're doing, you are just spawning another application process. Unless the application that...
  21. Replies
    10
    Views
    1,577

    You want to be able to compile this into a...

    You want to be able to compile this into a working program?


    #include <iostream>

    int main()
    {
    std::cout << (2 == 1);
    return(0);
    }
  22. Replies
    17
    Views
    2,783

    ...no. Once you return, your function is done....

    ...no. Once you return, your function is done. return() does just that - it returns the execution flow back to the calling function.

    You do not fclose() at all. That's the calling function's job.
  23. Replies
    17
    Views
    2,783

    ...Yes, assuming you want to return the file...

    ...Yes, assuming you want to return the file pointer to the calling function. Which I think is what you need to do here. Right now with your code, all you're doing is returning null.

    Though if...
  24. Replies
    17
    Views
    2,783

    ...What? You're calling the function open() which...

    ...What? You're calling the function open() which returns a FILE*. fp is just a pointer to your FILE handle.
  25. Replies
    17
    Views
    5,204

    Edit: It's (*mainzone).blocklist, per laserlight....

    Edit: It's (*mainzone).blocklist, per laserlight. Sorry. :)

    (*foo).bar == foo->bar.

    Operator . binds tighter than operator *, per http://www.cppreference.com/operator_precedence.html. That's...
Results 1 to 25 of 320
Page 1 of 13 1 2 3 4