Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.25 seconds; generated 30 minute(s) ago.

  1. Before messing with the intricacies of an actual...

    Before messing with the intricacies of an actual image, you can prototype what you need to do with simple code.



    char image[5][5] = {
    { 'a', 'b', 'c', 'd', 'e' },
    { 'f', 'g', 'h',...
  2. Replies
    13
    Views
    1,669

    TBH, I'm surprised it's getting as far as it is....

    TBH, I'm surprised it's getting as far as it is.
    The code is riddled with compilation errors.


    $ g++ -Wall -Wextra foo.cpp 2>&1 | grep -A5 error:
    foo.cpp:107:16: error: no match for...
  3. Replies
    13
    Views
    1,669

    Well you need to look closely at what's in packet...

    Well you need to look closely at what's in packet 139, because the response in packet 141 is "bad request".
    Also, you only need worry about protocol=HTML messages. The TCP chatter probably isn't...
  4. Replies
    13
    Views
    1,669

    > In regards to string.size() am I correct to...

    > In regards to string.size() am I correct to assume that you mean string.length()?
    Yes.

    > I specified a buffer of 999mb in the recv buffer because I wanted to have the ability to receive that...
  5. Replies
    13
    Views
    1,669

    1. When posting code, please use "copy as text"...

    1. When posting code, please use "copy as text" in your IDE and/or "paste as text" in your browser.
    Your fancy colour scheme is a mess when posted on forums. I've fixed it for you this time.

    2....
  6. Replies
    2
    Views
    770

    No, but you can usually do it on the command...

    No, but you can usually do it on the command line.

    Eg
    gcc src/prog.c -o obj/prog.o
  7. > I think it is a challenge for a compiler to...

    > I think it is a challenge for a compiler to know where the variable is declared.
    Not really.
    At the start of the .c file, the scope is global.
    After that, it's just a matter of keeping track of...
  8. > When I declare a variable, how will I know what...

    > When I declare a variable, how will I know what type of linkage it is?
    Basically, everything at file scope is external by default unless you use the static keyword.

    Everything declared inside...
  9. Replies
    19
    Views
    1,436

    If your compiler has a wchar_t type, you should...

    If your compiler has a wchar_t type, you should be able to input unicode symbols.
    Phonetic symbols in Unicode - Wikipedia

    How you input unicode depends on your OS.
    How to type Unicode characters...
  10. Replies
    2
    Views
    380

    Without seeing all your malloc and free calls,...

    Without seeing all your malloc and free calls, it's impossible to say.

    Run the program through valgrind if you want a diagnostic.
  11. Replies
    2
    Views
    470

    Dunno, works for me. typedef struct { ...

    Dunno, works for me.


    typedef struct
    {
    int date_1;
    int date_2;
    int date_3;
    }Date;
  12. Replies
    3
    Views
    2,528

    This is where you start, to get a feel for what's...

    This is where you start, to get a feel for what's possible.
    Windows WMIC (Windows Management Interface Command) Tutorial with Examples – POFTUT

    This is where you can access all the gory details....
  13. Replies
    2
    Views
    2,014

    First, learn how to indent code. Your...

    First, learn how to indent code.
    Your indentation is all over the place, making your code impossible to follow.


    node *search(int val)
    {
    node *cur = head;
    while (cur != NULL) {
    if...
  14. Replies
    4
    Views
    1,864

    You don't need to know that 2 is green. There...

    You don't need to know that 2 is green.
    There are symbols to tell you that.

    Console Screen Buffers - Windows Console | Microsoft Docs
    Like
    SetConsoleTextAttribute (Con, FOREGROUND_GREEN);
  15. > I have been working on my Robot Sumo project...

    > I have been working on my Robot Sumo project for months and it still doesn't work and i can't tell why is that. My project is due tomorrow
    And you couldn't have like turned up a week ago, where...
  16. Replies
    4
    Views
    1,864

    Since you seem to be using windows, use this....

    Since you seem to be using windows, use this.
    SetConsoleTextAttribute function - Windows Console | Microsoft Docs
  17. Replies
    3
    Views
    2,528

    Well you need to tell us which OS you're using to...

    Well you need to tell us which OS you're using to begin with.

    In addition, for some things, you'll need to be able to run the code at admin/super user level.
  18. Replies
    5
    Views
    1,021

    TBH, the address of a variable is seldom as...

    TBH, the address of a variable is seldom as interesting as it's contents.

    Once the stack frame is established, your local variables never change address, but their contents will change.

    Some...
  19. Replies
    5
    Views
    1,021

    Well there is only one address. Your %d is the...

    Well there is only one address.

    Your %d is the wrong format for displaying addresses.
    1. It's in decimal, so that's a source of confusion.
    2. Your addresses are 64-bit, so most likely you're...
  20. Replies
    5
    Views
    1,021

    Can't you just write &Number in the address bar...

    Can't you just write &Number in the address bar of the memory display?
  21. Replies
    4
    Views
    514

    Well getchar() actually returns an int, so you...

    Well getchar() actually returns an int, so you should really have

    int gtch;
    gtch=getchar();
    if ( gtch != EOF ) {
    gtch=gtch-'0';
    cases[gtch]='y';
    }
  22. Replies
    4
    Views
    514

    > On my program I have 9 char named c1,...c9....

    > On my program I have 9 char named c1,...c9.
    Rather than doing
    c1, c2, c3 etc

    you use an array instead.


    char c[9];

    This gets you 9 chars labelled c[0] to c[8];
  23. Replies
    8
    Views
    1,172

    No it doesn't. #include int main()...

    No it doesn't.


    #include<stdio.h>
    int main()
    {
    int n;
    printf("Enter No. of Rows : ");
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
  24. Replies
    8
    Views
    1,172

    The first step is to make it output the same...

    The first step is to make it output the same number of trailing spaces as leading spaces.

    So that the pattern is essentially rectangular in shape.
    ....*....
    ...* *...
    ..* * *..
    .* * * *.
    * *...
  25. Replies
    12
    Views
    4,776

    > GTEST = C:\MinGW\lib\libgtest.a A library...

    > GTEST = C:\MinGW\lib\libgtest.a
    A library would normally be specified using
    -L to tell the linker where to look
    -l to tell the linker the base name of the library.

    Eg


    GTEST =...
Results 1 to 25 of 493
Page 1 of 20 1 2 3 4