Search:

Type: Posts; User: Crimpy

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    1,812

    cuz I wasn't here genius. The only reason I...

    cuz I wasn't here genius. The only reason I decided to post was I was reading what looked like an interesting thread and then I saw you insult everyone who was nice enough to try and help you.

    No,...
  2. Thread: Randomizing

    by Crimpy
    Replies
    18
    Views
    3,075

    Random numbers are a ***** to get right, and you...

    Random numbers are a ***** to get right, and you can't expect everyone to use the best algorithm. rand is standard and every implementation meets the requirements, but that doesn't mean they're all...
  3. Replies
    2
    Views
    1,092

    In C++ the typedef is implicit, you don't have to...

    In C++ the typedef is implicit, you don't have to worry 'bout it.
  4. Replies
    12
    Views
    1,812

    Someone did post it, if you're not smart enough...

    Someone did post it, if you're not smart enough to understand the code you've been given, that's not our problem. Cela's code does exactly what you asked, it has a virtual base function and a derived...
  5. Replies
    10
    Views
    1,073

    How the hell should I know? All I know is that of...

    How the hell should I know? All I know is that of several different operating systems I've used, all of them run faster with buffered input than with character by character. Or to spell it out since...
  6. Replies
    10
    Views
    1,073

    That's between you and your system, buffered...

    That's between you and your system, buffered input is almost always faster than character by character input.

    That was my point entirely, your way printed 2 with a 3 line file that didn't end in a...
  7. Replies
    48
    Views
    14,349

    C++ really isn't any better, but you can be...

    C++ really isn't any better, but you can be reasonably sure that you'll use most of C for any given program where with C++ you won't even use 15% of the language even for huge programs. You can know...
  8. Replies
    10
    Views
    1,073

    std::ifstream fin("file.txt", std::ios::in); ...

    std::ifstream fin("file.txt", std::ios::in);

    int lines = 0;
    char c;

    do
    {
    fin.get(c);
    if (c == '\n')
    ++lines;
  9. Replies
    9
    Views
    1,901

    Because you're taking without giving anything...

    Because you're taking without giving anything back. We want to know that you're trying, otherwise it's a waste of time helping you out and we have better things to do.
  10. Thread: float

    by Crimpy
    Replies
    10
    Views
    1,302

    Yea, but you can't quantify exactly what the...

    Yea, but you can't quantify exactly what the difference is, so twice as much as as good as any for a "Duh" question like that.
  11. Thread: float

    by Crimpy
    Replies
    10
    Views
    1,302

    A double precision variable has twice the...

    A double precision variable has twice the precision of a single precision variable. Isn't that kind of obvious?
  12. Thread: Pointers Help

    by Crimpy
    Replies
    7
    Views
    1,043

    Dynamic data structures like linked lists and...

    Dynamic data structures like linked lists and binary trees are best made with pointers. You can use pointers to pass big objects around without worrying about copying them. You can use pointers to...
  13. Replies
    36
    Views
    3,502

    Right, you overload

    Right, you overload << for ooint to act on an ostream


    ostream& operator<<( ostream& os, const ooint& stuff )
    {
    //print stuff
    }
    then you can do stuff like cout << a << endl because cout...
  14. Replies
    36
    Views
    3,502

    do you have an overloaded = like this? ooint...

    do you have an overloaded = like this?
    ooint operator=( int rhs )
    If you do then it's all good
  15. Thread: stl list

    by Crimpy
    Replies
    3
    Views
    1,019

    Works good for me #include ...

    Works good for me


    #include <iostream>
    #include <list>

    using namespace std;

    template<class T>
    void PrintList( const list<T>& l )
  16. Replies
    36
    Views
    3,502

    You don't, int + int is built into the compiler,...

    You don't, int + int is built into the compiler, so it does everything for you as long as ooint has an overloaded = operator that takes an int.
  17. Replies
    13
    Views
    19,470

    in C++ a structure and class are the same except...

    in C++ a structure and class are the same except a class is private by default and a structure is public by default. There's no comparison with a C structure because it can't have methods, just...
  18. Replies
    36
    Views
    3,502

    Look dude, you have to overload an operator for...

    Look dude, you have to overload an operator for every type you want to use it with, if you want to do ooint b = a + 1; then you've got to define

    ooint operator + ( const ooint & lhs, int rhs )
    If...
  19. Replies
    5
    Views
    1,734

    A hash file? That's weird, but you can try using...

    A hash file? That's weird, but you can try using fseek, I'm not sure, but this works for me.


    #include <stdio.h>

    int main( )
    {
    FILE *fp;
    char rec[100]; // Record size is 100
    ...
  20. Replies
    6
    Views
    12,570

    Your compiler is protecting you from yourself....

    Your compiler is protecting you from yourself. Just because it works doesn't mean it's right.

    void main() is wrong, int main() is right. That's the difference. Even if it seems like its working...
  21. Replies
    5
    Views
    2,075

    Question - When writing an operating system,...

    Question - When writing an operating system, isn't it required that stuff like the boot loader has to be written in assembly? Or can it be written in optimized C and still work?

    Cheers! :)
  22. Thread: Windows XP

    by Crimpy
    Replies
    5
    Views
    1,565

    No, you can't. If this scares you then send XP to...

    No, you can't. If this scares you then send XP to the bit bucket and go get Linux.

    Cheers! :)
  23. Replies
    5
    Views
    2,075

    I guess it's good to learn if you wanna speed up...

    I guess it's good to learn if you wanna speed up your programs, but from what I've seen, all inline assembly does is give you quick access to the hardware if your operating system allows it. I think...
  24. Replies
    2
    Views
    1,745

    I don't have that book, but if you send me the...

    I don't have that book, but if you send me the questions then we can still do them together if you want. I don't usually have much better to do with my spare time except learn other languages and...
  25. Poll: Maybe the cause of so many on-posters is because...

    Maybe the cause of so many on-posters is because they registered and then either didn't choose to come back or they had no way of deregistering for whatever reason. How about a time limit for new...
Results 1 to 25 of 67
Page 1 of 3 1 2 3