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...
Type: Posts; User: Bryan_James
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...
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...
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...
and
and also
The first bug is, "PO" is a structure tag. Adding a keyword "struct" before "PO" will fix this problem.
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...
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...
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 {
Here is a sample data from file:
12345ABC, 9
87321POI, 4
70975MMN, 6
Here's a code fragment on how I scanned it:
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...
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.
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()
oh.. yes, I forgot it. Thanks! My problem has been solved now! Thank You Very Much!
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...
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...
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...
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!
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 =...
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...
Thank you very much!
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...