Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.33 seconds.

  1. Make the compiler do the work. char...

    Make the compiler do the work.


    char alphabet[] = "abcdefghijklmnopqrstuvwxyz";
  2. It should be scanf("%d", &a); not scanf("%d,...

    It should be
    scanf("%d", &a);
    not
    scanf("%d, &a");

    You got the end " in the wrong place.

    The compiler should have warned you.
  3. > char alphabet[26] =...

    > char alphabet[26] = "abcdefghijklmnopqrstuvwxyz";
    There is no guarantee that you're getting a \0 in your string.
    So strlen() on it is broken.
  4. So what does this do? ...

    So what does this do?


    SERCOM0_USART_Write("", 1);
    SERCOM0_USART_Write(&message[0], sizeof(message));


    If you don't see message, then try replacing all the sizeof with strlen....
  5. How about posting more than 2 lines of code. ...

    How about posting more than 2 lines of code.

    How is it called?
    How are those variables declared and initialised?

    Using sizeof() on a char array means you're going to send a \0, and that may be...
  6. Replies
    3
    Views
    177

    Well we don't have your data file, so have you...

    Well we don't have your data file, so have you run the code in a debugger?

    Put a breakpoint on
    > while(curr->next != NULL)
    and run the code.

    The debugger will stop the code when it gets to...
  7. Also here -> Passing A 2d Array To A Function,...

    Also here -> Passing A 2d Array To A Function, Using The Pointer To A 2D Array - C And C++ | Dream.In.Code
  8. Replies
    2
    Views
    199

    Why can't you look into it?

    Why can't you look into it?
  9. Replies
    6
    Views
    162

    OK, so run it in the debugger, put a breakpoint...

    OK, so run it in the debugger, put a breakpoint on line 61 and see what happens.

    Don't rely on %s telling you what's in _path
  10. Replies
    6
    Views
    162

    > And this is the output (directory has been...

    > And this is the output (directory has been modfied to ~):

    But you're not opening an absolute path.
    Opening '~/opengl_example/main.c'

    It's only your shell that understands ~ and variables...
  11. > I want to use C for web development. C is too...

    > I want to use C for web development.
    C is too low level for this.

    If you're just writing client side code, you're just going to be wasting a lot of time on low level details.
    Even if you use...
  12. Replies
    35
    Views
    936

    Here's an example. 1. Create a minimal...

    Here's an example.

    1. Create a minimal recovery set for some file.


    $ cp 20200903_055944.mp4 dummy.mp4
    $ par2create -c1 p2c_test1.par2 dummy.mp4
    Block size: 85456
    Source file count: 1...
  13. Replies
    35
    Views
    936

    > Do you happen to know what the overhead is? For...

    > Do you happen to know what the overhead is? For a 100 MByte file, how big is the ECC file(s) that go with it?
    You can choose your recovery size.


    $ par2create -c1 p2c_test1.par2...
  14. OK, so what does the compiled version of the code...

    OK, so what does the compiled version of the code do that is different to what you want it to do?

    You look at the first behaviour difference, you study the code to identify potential causes in the...
  15. Apart from your idea of "tutorial" being "random...

    Apart from your idea of "tutorial" being "random out of context forum post".

    Start with the clean copy of PacketProcessor and all the other stuff it comes with.
    Does it compile?

    Before you...
  16. Replies
    1
    Views
    157

    Duplicate of this ->...

    Duplicate of this -> https://cboard.cprogramming.com/cplusplus-programming/180376-undefined-reference-%60packetprocessor-setseqstart-unsigned-char-|.html
  17. Normally I would suggest learning some C++ to...

    Normally I would suggest learning some C++ to begin with.

    But you could try making those free functions class member functions by putting PacketProcessor:: in front of the function name - you...
  18. Replies
    4
    Views
    287

    A bit like that, but without using any global...

    A bit like that, but without using any global variables.
  19. > and remove these variables and functions One...

    > and remove these variables and functions
    One of which seems to be
    > void PacketProcessor::SetSeqStart(unsigned short val)

    However....
    in packet.cpp under the includes add


    unsigned short...
  20. Who can say without some visibility of code...

    Who can say without some visibility of code you've actually written.
  21. Is PacketProcessor one of your classes, or...

    Is PacketProcessor one of your classes, or something you've downloaded?

    A few common mistakes are
    - not implementing the function (despite mentioning it in the class)
    - getting the type wrong...
  22. Replies
    4
    Views
    287

    You could start with this idea. ...

    You could start with this idea.


    #include<stdio.h>

    void function(int N, int Number[])
    {
    for(int i=0; i<N; i++)
    {
    printf("print Number : ",...
  23. Replies
    35
    Views
    936

    About File Management - Win32 apps | Microsoft...

    About File Management - Win32 apps | Microsoft Docs
    Any windows compiler will have access to this API.

    > Now I want to write a fast-as-hell file checksummer
    Bear in mind that it doesn't matter...
  24. Replies
    2
    Views
    362

    Well start with a separate test program like...

    Well start with a separate test program like this.


    int product_of_digits(int n) {
    int product = 1;
    // do something here
    return product;
    }
    int main ( ) {
    int n = 1234;
  25. > i = sum - i; Well the questions you need to...

    > i = sum - i;
    Well the questions you need to answer are
    - what are you subtracting
    - what are you subtracting it from

    > so i am having a trouble in subtracting a number that contains 3
    Sure,...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4