Apologies,
I was deallocating another array within another function. That is what was causing the problem.
Thanks again for helping.
cfd
Type: Posts; User: cfdprogrammer
Apologies,
I was deallocating another array within another function. That is what was causing the problem.
Thanks again for helping.
cfd
Hi, thanks for replying, but although I change the allocation following your suggestion, I am still getting the error the the pointer I am freeing was not allocated to begin with.
I don't know...
Hi all,
I am having a problem I never had before when deallocating a pointer to char. I am not sure what I am doing wrong because I am using the same standard I have used other times.
I am...
Hi Claudio, thanks for the quick reply.
That's an option. I was not sure whether those functions would return an integer if it surely cannot be converted; I in fact imagined they would return...
Hi everyone,
I have been looking for a sort of isstr function to recognize if a string read from a file is a string of characters or or a string of numbers, but apparently this function is not a...
Hi again,
I actually need to concatenate because the string name at hand depends on something that is done beforehand inside this function. About that I cant really do otherwise.
Sorry...
Hi Sam,
thanks fro helping. Yes, what I obtain is the error of inexistent file although the file is physically in the working directory.
Error opening file: No such file or directory.
...
Hello,
I am having a problem when I try to open a file from within a calling function.
I have a main function that defines part of the string name of a file (the file already exists in the...
Hi Quzah,
Sorry about that, you are right. Thanks fro helping.
All the best,
cfd
Thank you!
But can I count the number of entries by using sscanf? I dont actually have to store them to any array, but only count them for a subsequent call to another function
thank you again
Hello Adak,
Look, I have a similar issue to this posted earlier today and to which you helped me find a solution; now, instead of being able to recognize the additional blank lines at the end of...
Hi Adak and Quasah,
Thank you very much to both. I actually tried all the options, and although both options suggested by work fine, I could not get Quasah's to work.
What happens with Quasah's...
Hi everyone,
I am trying to have a function that can read a file of floats.
This is very straight forward and I did that with different types of files before; however, given that previously I...
Hi yezaim,
thanks for helping. This is the hint I needed. It is a problem in the use of doubles on a machine I barely started to use.
Thank you again, I appreciate it
Best
Hi Epy; it's not a matter of posting an unfinished code for someone to steal it. I have several of my own open source codes already online on my web. The only reason for not posting this one here is...
Hi idelovski, thanks for writing,
SInce it is kind of difficult to send the code or part of it, I can surely send the makefile:
CC = gcc #Compiler is gcc
LD = gcc -lm #Linker is gcc...
Hi again tabstop,
I would like to show the code, but it's an actual software that I am developing and it has about 15 functions. What I did, I entered eachone of the them and changed the floats...
hi, actually, I would expect different results within certain limits (after a certain floating point); what I am getting is NAN where I am supposed to obtain real value.
I am not calling functions...
hi tabstop,
This is the problem: when I code my program using floats the software performs correctly, but when I change "float" with "double" everywhere, the code still compiles, but the...
Hi users,
I am having problems when I want to code in double precision and compile on a Max OSX, 10.5, darwin. I compile with gcc-4.0.1
Would that be a compiler fault on the machine? Is it...
Hi, thanks for replying and trying to help.
I indeed freed some memory from space that was not allcoated. I was allocating certain previous arrays with npts elements without noticing that npts was...
Hi everyone,
something very strange is happening in a very simple code;
specifically, I have this function:
void flinspace(float vmin, float vmax, int n, float *VECT)
{
//!!! VECT must...
I actually have an array of pointers. I use two and are structured as arrays of strings dynamically allocated. This is good start because I actually modified one of them recently. I'll check on that...
Hi, thanks for replying. I may indeed be running otu of memory since this is not happening on another machine with twice as much RAM. What is strange though, is that it does not "fail" when larger...