Search:

Type: Posts; User: Bryan_James

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,336

    Different kinds of main() function

    Hi! I'm currently familiar with 2 'kinds' of main() function. The first one is:


    int main();
    int main(void);
    int main(int argc, char *argv[]);

    I think this is the standard 'main()' in C and...
  2. I think it is important that the types and format...

    I think it is important that the types and format specifiers exist that can carry the same minimum and maximum values. Does "PRIu64" and family does not display integers as long as the "unsigned long...
  3. Cross-platform format specifier and types.

    I searched the internet for any %llu equivalent in Windows. I learned that I should use %I64u. I also tried searching for any ways to cross-platform a type and format specifiers. They said to use...
  4. and and also The first bug is, "PO"...

    and



    and also



    The first bug is, "PO" is a structure tag. Adding a keyword "struct" before "PO" will fix this problem.
  5. Replies
    1
    Views
    476

    Removing last line carriage return

    Hi! I would like to create a function that would add border to the console screen. But whenever I add the last line of the border in the console, the console would automatically scroll down (without...
  6. printf () before scanf () and string to expression

    Hi!
    I have two questions.

    1. Is it possible to make the insertion point (or scanf()) appear before a printf()?
    Example:
    Enter a weight: _ (kilograms) // "_" means insertion point

    2. Is it...
  7. Replies
    2
    Views
    1,325

    Placing structs on header file

    Hello! I'm trying to put a struct on a header file. Here is the code:


    #ifndef _STRUCTS_H_
    #define _STRUCTS_H_
    #define MAX_SIZE 1000


    typedef struct {
  8. Here is a sample data from file: 12345ABC, 9...

    Here is a sample data from file:


    12345ABC, 9
    87321POI, 4
    70975MMN, 6


    Here's a code fragment on how I scanned it:
  9. Okay, so I think here's the problem. The code...

    Okay, so I think here's the problem. The code works if I used the constant character pointer "input". But, if I replace the variable "input" with the character array used in the program, it will be...
  10. I don't know why, but I copied your code in my...

    I don't know why, but I copied your code in my IDE and compiled it using MinGW GCC 4.8.1. The result for me is failure.
  11. Hello again, I got more problems again regarding...

    Hello again,
    I got more problems again regarding sscanf ();

    Here is an example text file:


    65AMO125, 9


    I scanned and extracted the data using sscanf()
  12. oh.. yes, I forgot it. Thanks! My problem has...

    oh.. yes, I forgot it. Thanks! My problem has been solved now! Thank You Very Much!
  13. I tried using "%[^0-9]". It works and it fixed my...

    I tried using "%[^0-9]". It works and it fixed my problem. But the program doesn't get the integer "intvar". It's value is always zero.
    And, May I know what is the function of format specifier...
  14. Using fgets() to scan a data before a delimiter

    Is it possible to fgets() the string (or word) only after a delimiter? I yes then how?


    Example:

    printer, scanner, machine



    Also, how can I sscanf() a string with an indefinite number of...
  15. Replies
    7
    Views
    815

    I am trying to create an 8 dimensional character...

    I am trying to create an 8 dimensional character array. And store some letters in it.
    I tried 8 dimensional array (string). But compiler says "size of array 'letter' is too large". I am using...
  16. Replies
    7
    Views
    815

    Multi-dimensional Array in C

    Hello. Is it possible to create an 8 dimensional array in C?
    If no, then what can I do to improvise or let say bypass the limit?

    Thanks in advance!
  17. Replies
    1
    Views
    899

    Scan for a specific data

    Hello. I created a program that will create a file and print a list on it.
    Here is the code for my program:


    int controlvalue(void) {
    FILE *controlvalue;

    controlvalue =...
  18. gets() and scanf() won't wait for user input

    I am creating a program that will get the string input by user. After the program ran, it will ask if the user wants to repeat the process with different strings.



    char strCode [1000];
    int ctr...
  19. Thank you very much!

    Thank you very much!
  20. Getting the value in the last line of a file.

    Hello, I am very new to C programming. Lets assume that the program creates a number of string separated by lines. Is it possible to fgets() the last line of the file? If yes, then how? Thank you...
Results 1 to 20 of 20