Search:

Type: Posts; User: whiteflags

Page 1 of 20 1 2 3 4

Search: Search took 0.11 seconds; generated 21 minute(s) ago.

  1. Replies
    3
    Views
    1,286

    Hello John, thanks for your comments. I figured...

    Hello John, thanks for your comments. I figured that supplying a generator would be one of the first changes people would make. I didn't want to bother so I used an older standard. Next time I...
  2. Replies
    3
    Views
    1,286

    Scrabble rack generator (not really)

    How about a dumb program?
    It turns out that words are legible if you put the letters in any order, as long as the first and last letter are kept correct. So I quickly threw something together that...
  3. The point of this page is to specify what...

    The point of this page is to specify what platform you are targeting. Platform isn't strictly the right word, but besides, there are different types of applications you can program for Windows. The...
  4. Replies
    3
    Views
    5,184

    So the idea of this is fine, I guess. > char...

    So the idea of this is fine, I guess.

    > char key[100];
    Here you declare key as an array and it's empty.

    > k = 'A' + (c - key);
    Then you start using the array name of the key to decrypt...
  5. Replies
    7
    Views
    7,517

    The program will need to convert the text "53"...

    The program will need to convert the text "53" and other bytes written out like "6a" into numbers. When you have the numbers in number format, then you can use them as characters.

    It's a simple...
  6. Replies
    7
    Views
    7,517

    That sounds more correct. What matters with files...

    That sounds more correct. What matters with files is how you open them. There are different functions that make reading text files easier, like fgetc, that you know, and there are different functions...
  7. Replies
    7
    Views
    7,517

    Are you trying to read a text file with fread?...

    Are you trying to read a text file with fread? That's what it sounds like and it's not exactly the most practical thing. For one thing, if fread succeeds, you would still need to turn '5' (the...
  8. Replies
    9
    Views
    9,492

    As a technical note, if you shift left normally...

    As a technical note, if you shift left normally the leftmost bits will be discarded. If you somehow shift these bits back into the lower end, that describes a rotation.

    The method you have seen...
  9. Replies
    4
    Views
    14,987

    I think you're on the verge of turning your...

    I think you're on the verge of turning your tokenizer into a parser. It does not need to be more complicated than separating tokens from white space. Separating tokens like "j=+3" or "j+3" into parts...
  10. Replies
    3
    Views
    9,252

    While this works, the p1 object has global scope,...

    While this works, the p1 object has global scope, which is probably overkill. You wouldn't need personPtr at all.

    If the point of the exercise was to use pointers, it makes more sense to write...
  11. It is not enough to just print the numbers that...

    It is not enough to just print the numbers that are the largest and smallest. The computer is not going to remember which variable it is, so you need to also assign the largest number to a, and the...
  12. Replies
    13
    Views
    9,263

    I'm pretty sure you wrote hatvany() wrong. alap...

    I'm pretty sure you wrote hatvany() wrong. alap *= alap; doesn't really help much.

    You want to do, for example:
    res = 1;
    alap = 2;
    exp = 3;
    res *= alap;
    --exp;
    res *= alap;
    --exp;
  13. Replies
    12
    Views
    12,357

    Well, these questions are for mind readers. What...

    Well, these questions are for mind readers. What did you press? What was the four digit number you cast into?

    Here's another fact about unbuffered input. Every single keypress matters. In a way,...
  14. Well, encryption is a rather big topic and using...

    Well, encryption is a rather big topic and using it in a secure way can be hard. I'm going to assume that whatever you want to hide is fairly nonserious and you just want to protect a file from...
  15. Consider encryption. It might be a pain...

    Consider encryption.

    It might be a pain because you have to learn an encryption algorithm, and your program has to decrypt the file (in RAM) before using the contents, but the contents are at...
  16. Replies
    8
    Views
    4,925

    You might want to read your IDE documentation in...

    You might want to read your IDE documentation in case your setup uses a default makefile and target.

    The way that make works is "make -f <makefile> <target>" when specifying a file and target, or...
  17. Replies
    35
    Views
    21,422

    Bear with me but I don't think these cases are...

    Bear with me but I don't think these cases are very realistic. 4/5 are about cheating in gaming, which I think you know is wrong and you can be caught all the time and lose the ability to play. Steam...
  18. Replies
    6
    Views
    25,002

    OK well, by choosing to declare the array outside...

    OK well, by choosing to declare the array outside of main or any other function you are implicitly saying it has a static storage duration. This can mean a few things, but in this case it means that...
  19. Replies
    35
    Views
    21,422

    It might be instructive to read the wikipedia...

    It might be instructive to read the wikipedia page on decompilers. There are numerous challenges to doing it with any sort of positive outcome. The code that will be spit out is not a thoughtfully...
  20. Replies
    8
    Views
    7,705

    I think part of the problem is you repeated the...

    I think part of the problem is you repeated the material type a lot. There are two switches handling the same thing.

    It would be way easier to understand if there were one switch handling that...
  21. Replies
    8
    Views
    7,705

    The program doesn't even have to be that fancy,...

    The program doesn't even have to be that fancy, you can use simple techniques and get it done, just start and ask a more concrete question.

    You've done your exams, and even if you passed them with...
  22. Thread: Homework

    by whiteflags
    Replies
    14
    Views
    10,482

    Correct me if I'm wrong, but it looks like you...

    Correct me if I'm wrong, but it looks like you are compiling for the macintosh. You can fix the error with sleep(1); by including the Mac header for it: #include <unistd.h>. More here.

    Review how...
  23. I've also never heard of this. However, the math...

    I've also never heard of this. However, the math is based on using a scale factor. If you can figure out a suitable base-ten scale factor for your input, then you can do the math in integers with all...
  24. That wouldn't be what I would do, personally. I...

    That wouldn't be what I would do, personally. I would pass i and j into the function and calculate i*x+j internally. This way, you can think of board the way you are using it, even though it is just...
  25. I think you should be able to copy the 2D array...

    I think you should be able to copy the 2D array algorithm whole cloth if you just convert the i, j coordinates to a one dimensional subscript.

    It's a simple formula i * x + j where x is the total...
Results 1 to 25 of 498
Page 1 of 20 1 2 3 4