by: John Eskie |
last post by:
Lately I've seen alot of C and C++ code (not my own) which doesn't do any
checking if memory obtained by new or malloc is valid or if they return NULL
pointers.
Why does most people not care about...
|
by: mike79 |
last post by:
Hey all,
Im use to using malloc() with a one-dimensional array. But I have
found the need to use a 2D array, and would like to confirm whether I
am allocating memory correctly.
As I can...
|
by: Kevin Torr |
last post by:
http://www.yep-mm.com/res/soCrypt.c
I have 2 malloc's in my program, and when I write the contents of them to
the screen or to a file, there aren addition 4 characters.
As far as I can tell,...
|
by: Mannequin* |
last post by:
Hi all,
I'm working on a quick program to bring the Bible into memory from a
text file. Anyway, I have three questions to ask.
First, is my implementation of malloc () correct in the program to...
|
by: Fatted |
last post by:
I'm trying to learn how to create arrays dynamically. But its just not
happening. Have a look at code below and point and laugh where
appropriate...
First part of program, I'm using an array of...
|
by: questions? |
last post by:
if I use malloc() in a function to allocate a space for my array of
structures. I didn't free() them anywhere in the program.
I found that I can still use that space after I come back to...
|
by: Jack |
last post by:
In the following code:
char *p;
while(1){
p = malloc(10*sizeof(*p));
//Do something with p
|
by: fool |
last post by:
Dear group,
if I want to allocate a string with a help of malloc then, shall
I use the following in a loop?
char *s;
s = malloc(strlen(s)+1);
Any pointer reference is help full. I went through...
|
by: Jorge Peixoto de Morais Neto |
last post by:
I was reading the code of FFmpeg and it seems that they use malloc
just too much. The problems and dangers of malloc are widely known.
Malloc also has some overhead (although I don't know what is...
|
by: jbholman |
last post by:
I am pretty new to C and doing my first project in C. I actually read
almost the entire FAQ, but can't seem to figure out this problem.
I have a structure. I have a list of these structures. ...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|