Make sure you turn on Warnings, and insure your warning level is turned up to the highest level to see all warnings and errors in your code!
Type: Posts; User: rstanley
Make sure you turn on Warnings, and insure your warning level is turned up to the highest level to see all warnings and errors in your code!
Other errors when compiled in gcc v. 10.2.1:
foo.c:31:20: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
foo.c:33:33: warning: format...
You would first need to provide a sample data file so the code could be tested.
Without compiling the code, the one thing I see is your call to strtok_r() on line 31. You need to pass the source...
kixify:
Please move this thread to the C++ forum, as your code IS C++ and this C forum is for the discussion of C code only.
Thank you!
No, plus you are in the wrong forum as your code is C++, not C.
All command line arguments ARE pass as "String" arguments, even numbers.
int argc contains the number of strings on the command line. One for the program name (Usually) and one for each argument...
You need to post your code in Code blocks so we can see why you are "facing many errors".
Make sure your warnings are turned on and set to highest warning level. Don't know what compier you are...
A static variable holds the value the last time the function was called. The variable was only initialized once the first time the function is called. Static local varriables are stored in the...
Use memcmp() for possible non Nul ('\0') terminated arrays. Use strcmp() for Nul terminated "Strings"
The whole this is very complex. Countries spanning Asia and Europe, Italy that contains separate "Countries", The Vatrican and San Marino. Countries that have no concept of divisions, and probably...
Even commenting out the Widows stuff so it can be compiled under Linux:
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <stdio.h>
//#include <conio.h>
#include <string.h>
I would choose the second one. However, do all countries have "States"? How are other countries subdivided, or not?
How would you handle the difference in Politics in the various countries?
You need to study a good up to date book on the C Programming Language, (Not C++) cover to cover, and do all the exercises at the end of each chapter! Choose one of the three listed below:
C...
What database and what Operating System?
Once you have answered those questions, a simple Google search would being up many links.
You need to post the actual code you typed into a file and attempted to compile, not a image of your handwritten code!
We cannot compile and test handwritten code, or an image! Nor do you know if...
You need to make a first attempt yourself. Then if you are having problems, post the code in CODE blocks, and ask specific questions. We cannot and do not do your work for you.
Please read the...
Also, please remove the call to "fflush(stdin)" fflush() is for output files only. Please read why.
Use this instead:
int ch = 0;
while ((ch = getchar()) != '\n' && ch != EOF);
ch must...
We all know how to declare and define functions, but the acronym, "UDF", is never used by most programmers. I wonder where you learned this acronym.
"User-Defined Function" maybe?
Bad instructor, book, video, or so-called tutorial I suspect.
"Dynamic Memory Allocation" functions such as malloc() and calloc() allocate memory from the "Heap" for use by the program. They have nothing to do with assigning any data to the allocated memory....
So the output you displayed above is what you expect? What is the actual output from your code?
We can't program the code for you. You have to make an attempt, and post your code so we can...
Programmers invented spell checker programs! ;^)
Then why specify using the Python RNG???
Post your code if have some problem with your code, and ask specific questions.
Bad at spelling also!
This is a C forum. The instructions say to use the Python RNG, rather than the C version. Why do you think you should be coding the program in C!
rusyoldguy & Syazzz:
Instead of using:
scanf("%[^\n]", b.plateNo);
I strongly urge the use of fgets() instead and then remove the newline form the end of the string.
scanf() is fine for...
Yes, "ARTNAME" should be a #define.