Thank you so much guys!
Your inputs/information really "brighten" my brain!
So, at the first place we must be sure of how many/much memory our program needs?but this could probably leads to...
Type: Posts; User: huwan
Thank you so much guys!
Your inputs/information really "brighten" my brain!
So, at the first place we must be sure of how many/much memory our program needs?but this could probably leads to...
Hi all,
As we all know, one of the MISRA C rule discourages the use of malloc for dynamic memory allocation.
So, does anyone know is there any alternatives for malloc which do not break this...
actually I am looking for some strong points to convince my company management to approve my project (creating a MISRA-C code checker).
Currently, we have been using Klocwork as a static code...
LOL....you are right!!
but anyway, I am still looking for some opinions and information for the doubts I have in my previous reply. I need these information for my presentation on this Friday....
Thanks Salem! That really helps!
Does anyone know what are the differences between Klocwork and Misra-C Code checker?since both are also static code checkers.
What are the errors or warnings do...
Thanks for your info.
Do you know where could I get the sample source code of such a tool?
Hi all,
I am working on a project to create a MISRA C code checker to verify if the code/program is compliant to the MISRA C 2004 rules.
Can someone let me know what are the similar code...
When we do constant global variable assignment, is it a must to always assign it to a variable which is also a constant?
For eg:
In const_header.h
extern const int volume_arr[] ;
extern...
Yeah! You are right!
I just realised test.c did not include test_user_def.h, that's why there was no error.
But for other const global variables declaration files, they included the header file...
Here is another question.
In test.c
extern const int try_table[] = {1, 2, 3};
In test_user_def.h
If we declare a constant array with "const" like below,
In abc.c
....
const int tone_table[] ={1, 2, 3};
in header_def.h
Thanks a lot Foxman!!
But when I built it with C compiler, there was no such error when I didn't put "const".
Is this also one of the differences btw C and C++?
Hi guys,
I am kinda confused with extern const and const.
Please help to explain the usage of both.
I am having compilation/linking error when using extern const and const.
The code are...
Argghh!! sigh...what can I do?
I have been searching around and trying with different functions but none of them is working.
how about "settimeofday" and "gettimeofday"?
Can I use these functions in my c++ program?
I have tried with time() but somehow the compilation failed.
It says "struct tm" and time() are undefined.
I have included "time.h" but not sure why it failed.
Yeah very silly!!
Besides of SetSystemTime and GetSystemTime, are there any other c++ functions that can be used to get and set the system time?I mean alternative method.
I have no choice!...
Yeah! std_types.h is a self-defined header file and it must not be excluded.
Meaning that I must include std_types.h in my program and I am not allowed to modify this file.
Is there any other...
If I am using SetSystemTime and GetSystemTime, I must include <windows.h> right?
But I have this compilation error:->
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\basetsd.h(33) : error...
Hi,
Can you guys show me how to get and set the windows system time and date?
Is this "time(time_t long_time)" a function to get the windows time and date?
How about set time and date?
Please...
What if the data type is a structure?for eg: menuItem_t
Is the below definition correct?
menuItem_t **someData;
someData = new (*menuItem_t)[MAXSIZE];
delete [] someData;
Compile with Visual C++.
At compile time, we may not know how many elements are need to be allocated.
So, we would not know what array size to be defined. If that is the case, how are we going to...
Yeah. The naming is kinda confusing. We will correct them.
1 quick question:
menuItem_t **ptr_1;
and
oops!! I m sory.
Anyway, someone who declared the below stuff has just informed me, there was a mistake in the previous declarations.
Check the below declaration:-
menu_item_t * *...
Can you show me the complete code?
I still couldn't catch the solution you provided.