Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.18 seconds; generated 22 minute(s) ago.

  1. Replies
    9
    Views
    141

    > It helps me keep a uniform design. If you ever...

    > It helps me keep a uniform design.
    If you ever aspire to be a professional programmer or work in any kind of software team, it will be a source of friction for you.

    People will not accept your...
  2. > why do i get segmentation fault here?and how do...

    > why do i get segmentation fault here?and how do i fix it?
    You read the error message and fix the code, before trying to run it.

    That warning that was printed in your screen shot wasn't a slap...
  3. Replies
    31
    Views
    252

    > while ( (ent = readdir(glance->dir)) ) So...

    > while ( (ent = readdir(glance->dir)) )
    So which dir are you reading here?

    My guess is /proc is changed for some reason (maybe a process got added or removed), and that invalidated your...
  4. Replies
    9
    Views
    125

    Well since it began with "void main", printing...

    Well since it began with "void main", printing "I'm a banana" would have been no less undefined than any other answer.
  5. The last thing we need here are a stream of...

    The last thing we need here are a stream of codechef wannabies dumping their zero effort homework.

    @OP, start a new thread with some actual code of your own if you want to learn something.
    And...
  6. Thread: string problem

    by Salem
    Replies
    4
    Views
    80

    You don't tell us what's in keys to begin with,...

    You don't tell us what's in keys to begin with, and
    strcat(keys[x],"-");
    is only going to append a - to the FIRST one anyway.

    > void printData(void)
    A poorly named function if it goes around...
  7. Replies
    28
    Views
    333

    Nothing wrong with that. $ cat foo.cpp &&...

    Nothing wrong with that.


    $ cat foo.cpp && g++ foo.cpp
    #include <iostream>
    using namespace std;
    int main()
    {
    int firstNumber, secondNumber, sumOfTwoNumbers;
  8. Replies
    9
    Views
    141

    @structure, the ; on the ends of statement block...

    @structure, the ; on the ends of statement block braces are unnecessary.

    > scanf("%d \n", &books[i].pages);
    @JazzDev, trailing characters on the ends of scanf format strings are seldom ever what...
  9. > and can you please point me to any...

    > and can you please point me to any bankmanagement system code that meets modern standards?
    Why?

    Seriously, the point of these exercises are for you to write your own code. If doesn't matter...
  10. > int array[13195]; > int...

    > int array[13195];
    > int new_array[13195];
    This approach is totally impractical for any large number.

    Write a loop which just gives you the next prime number to begin with, then progress...
  11. > Does this mean the function addnumbers is...

    > Does this mean the function addnumbers is expecting two variables num1 and num2?
    As far as the function is concerned these are what they're called.

    The names of your variables where you call...
  12. Replies
    4
    Views
    155

    Post your code.

    Post your code.
  13. > It needs to be 0 - 1 - 10 - 11 - 12 - 13 -14...

    > It needs to be 0 - 1 - 10 - 11 - 12 - 13 -14 -15 -16 -17 - 18 - 19 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9
    OK, so you tweak john.c's code a little bit.

    > cmp = ra->x - rb->x;
    You basically have 4...
  14. Step 1 is indent your code. ...

    Step 1 is indent your code.


    #include<stdlib.h>
    #include<stdio.h>

    float **MatriceInput(int R);

    int main(void)
    {
  15. > - [0,0], [1,0], [10,0], [11,0],...[19,0],...

    > - [0,0], [1,0], [10,0], [11,0],...[19,0], [2,0], [3,0], ...[9,0]
    There's no 19 in your example input.

    Post an example of actual input, and an actual desired output.


    Does this match your...
  16. > How do you pass variables between functions? ...

    > How do you pass variables between functions?
    Erm, how did you manage to call printf and scanf then?
  17. Replies
    5
    Views
    155

    It helps to copy the very bare minimum into a...

    It helps to copy the very bare minimum into a file and try it.


    #include <stdio.h>

    // a function pointer
    typedef int (*ifunci)(int);

    // a const pointer to a function pointer
    typedef ...
  18. Replies
    1
    Views
    79

    You can replace the inner while loop with...

    You can replace the inner while loop with suitable application of / and %
  19. > Space is important? In printf and scanf format...

    > Space is important?
    In printf and scanf format strings it is.
  20. Well it seems to me that your attempt to read the...

    Well it seems to me that your attempt to read the "last name initial" failed, because you used "%c" as the format.

    Try instead a leading space in the format.


    char initial;
    printf("Enter...
  21. No it doesn't. Different how? Different...

    No it doesn't.

    Different how?
    Different position on screen - well, that's windows for you.
    Different contents - well, that's your program.
    Different termination message - maybe your program, if...
  22. Replies
    1
    Views
    97

    Well for small one-off functions, the simplest is...

    Well for small one-off functions, the simplest is to just copy the code - providing the licence terms are something you can agree to.

    If you only have /sbin/rarp, then you're stuck with just...
  23. Replies
    3
    Views
    168

    > I suck at programming and i rlly need help as...

    > I suck at programming and i rlly need help as it's due in a week's time
    You have plenty of time then to practice a few things, do some reading, post code attempts, get feedback etc etc.

    A...
  24. bank management system.c ...

    bank management system.c
    Get your money back, and stop trying to copy/paste your way to knowledge.
  25. Replies
    5
    Views
    183

    while ( 1 ) { if (kbhit) { what =...

    while ( 1 ) {
    if (kbhit) {
    what = getche();
    }
    switch(what)
    {
    case '1': writeBill(); break;
    case '2': retrieve(); break;
    // . . . .
    ...
Results 1 to 25 of 496
Page 1 of 20 1 2 3 4