Search:

Type: Posts; User: samus250

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,913

    well i guess that solves it. Thanks!

    well i guess that solves it. Thanks!
  2. Replies
    4
    Views
    1,913

    Keyboard Signals?

    There is a game on facebook in which you test how many keystrokes you can make in a minute. Of course I want to win. Is there any way to send keyboard signals to the system very very fast? I am on...
  3. Replies
    51
    Views
    9,595

    Cool way of doing buffered input. I tried to do...

    Cool way of doing buffered input. I tried to do it by dynamic allocation but failed miserably :-), I guess I learn something new every day. Thanks.
  4. Replies
    51
    Views
    9,595

    OK I am REALLY puzzled here......... I test...

    OK I am REALLY puzzled here.........

    I test the program with the example input given on the site... which should output 4.
    Why the heck does it give me 4 when I uncomment the commented printf,...
  5. Replies
    51
    Views
    9,595

    Reading with fread char by char is not good......

    Reading with fread char by char is not good... time was 8.29 seconds (and I thought the time limit was 8, but it got accepted anyways).


    #include <stdio.h>

    int main()
    {
    char b;
    ...
  6. Replies
    51
    Views
    9,595

    Wow... I didn't check this thread since my last...

    Wow... I didn't check this thread since my last post...

    I'll start reading with detail, I just browsed.

    But what about using fread? Would that be faster somehow?
  7. Replies
    51
    Views
    9,595

    That's what I was thinking too.

    That's what I was thinking too.
  8. Replies
    51
    Views
    9,595

    I will, thing is that I modified it, so I'll make...

    I will, thing is that I modified it, so I'll make it again.

    Also... any idea why is this code giving me a runtime error? (it's C)


    #include <stdio.h>

    int main() {
    long n, k, i, ti,...
  9. Replies
    51
    Views
    9,595

    Well, the judge told me it took .05 seconds...

    Well, the judge told me it took .05 seconds less...
  10. Replies
    51
    Views
    9,595

    Almost no difference with dynamic allocation,...

    Almost no difference with dynamic allocation, just .05 seconds faster.
    Without dynamic allocation, the program takes 2.5M, with it the program takes 9.9M so storing all the input to memory first is...
  11. Replies
    51
    Views
    9,595

    Holy crap it worked! Though there are people...

    Holy crap it worked!

    Though there are people who do it even faster. Mine took 5.36 seconds (8 seconds is the time limit) and some people do it in about 3 seconds (others in less than 1...)
    ...
  12. Replies
    51
    Views
    9,595

    by using scanf("%ld", &x)? ... let's try that.

    by using scanf("%ld", &x)? ... let's try that.
  13. Replies
    51
    Views
    9,595

    My other variation, which does not use dynamic...

    My other variation, which does not use dynamic memory allocation and also failed because of expired time limit.


    #include <iostream>

    using namespace std;

    int main() {
    long n, k, count...
  14. Replies
    51
    Views
    9,595

    Enormous Input Test

    I haven't been in these forums for a while... I've been learning much about Linux and about Perl and PHP :-)

    I do know a lot of C, but not much C++, and I found a cool website that has an online...
  15. Replies
    3
    Views
    1,333

    Thanks tabstop. atexit() seems to work fine and...

    Thanks tabstop. atexit() seems to work fine and it does what I need.
  16. Replies
    18
    Views
    21,314

    try this: #include int...

    try this:



    #include <stdio.h>

    int main(void)
    {
    int a = 5;
    char string[32] = "This is my string.";
  17. Replies
    3
    Views
    1,333

    Doing something before exiting.

    I want my program to do something before it exists when the user presses the close (X) key on the command prompt. Is it possible? If so, how can I do that? Thanks!

    P.S.: I'm on Windows
  18. Replies
    3
    Views
    1,226

    It works now. Thanks!

    It works now. Thanks!
  19. Replies
    3
    Views
    1,226

    File scan not working

    I want this program to scan a text file (given as an argument) and just put the alpha characters it finds. Why isn't it working? Thanks!


    #include <stdio.h>
    #include <ctype.h>

    int main(int...
  20. Replies
    15
    Views
    5,148

    OK, I'll talk here because I'm 17 too and I...

    OK, I'll talk here because I'm 17 too and I started programming just a year ago with C. I bought myself "C All-in-one Desk Reference for Dummies", and took absolutely no classes. After finishing it,...
  21. Daved: Yeah, that's what I was referring too. ...

    Daved: Yeah, that's what I was referring too.

    About books:
    I have Accelerated C++, but it is pretty accelerated hehe. And since it doesn't actually contrast between C and C++ then I had those...
  22. Thanks a lot. C++ rocks.

    Thanks a lot. C++ rocks.
  23. Some questions with strings, vectors, references...

    I am new to C++. My biggest problem is that I already know C. I thought learning C++ would be super easy since I've got my 1 year experience in C, but it is not so.

    Strings:
    OK, what I understand...
  24. Replies
    23
    Views
    3,366

    Thanks a lot! One small question about that...

    Thanks a lot!

    One small question about that ptrdiff_t type. What exactly will 'len' be, the size of bytes? Or would that depend on the types of pointers I'm subtracting?

    'cause I just...
  25. Replies
    23
    Views
    3,366

    ... oh and what do you mean by "block"? And I...

    ... oh and what do you mean by "block"?

    And I don't know what a resource is.
Results 1 to 25 of 183
Page 1 of 8 1 2 3 4