Thank you
S.
Type: Posts; User: simone.marras
Thank you
S.
It indeed does, but why this though?
thank you very much for helping!
I solved it in the following way, although I would have liked for the pointers to be assgigned the strings directly through fscanf:
fscanf(file_ID, "%s %s %s\n", header, prob,...
Hi there,
I am reading a file that contains both numbers and strings; by reading it sequentially, everything goes well when reading floats and assigning their values to an array previously...
I use g++
Hi again; actually, the problem is that I don't get either warnings or errors, that is why I couldn't understand what was going on.
At this point I'll pass directly to C++ next. I have a working C...
Hi Elysia,
Sorry about my distraction. I put a print for Input.msh_generator instead Input.msh_file because the same operation is actually done on Input.msh_generator; I just edited the code now...
Hi there Elysa; thanks for replying; I believe that fscanf(file_ID, "%s", &Input.msh_file) assigns to Input.msh_file the variable read inside file_ID in the order given by the file itself?
From...
Thanks about the hint. Then this was my initial question; how is it supposed to be done?
That is why I am using this forum;
Regards
S.
It actually does; it reads it a string and assigns it to the variable msh_file:
void Mesh::void Mesh::ReadInput(char *input_file, char *msh_generator, char *mesh_file, int *nsd)
{
FILE...
Hi again; actually I left some variables in this forum although they are not used within this simplified version of the code. All those variables are actually used, and the problem that occurs is...
Hi there, thanks for replying. It's actually a mixed of C/C++ because most of the functions I am using I had them already written in C. However, I used a new thing that I need to solve as an excuse...
Hi there; this question may be trivial to some, since I am new to C++, although I come from C.
I have a struct that defines a type (typeInput), and a class with a funtion that uses some of the...
Thank you, Ill manage
S.
Thank you a lot, I will try it sometime soon.
All the best
Thank you very much for the hint;
I do programming for math applications and Im barely learning on this; it surely helps learning by these suggestions
One more question, do you do C++ as well?...
thank you, but if I use a std::vector to declare COORDS, how would I access the elements of the struct?
thanks again
Hello MK,
thank you very much for helping: I really appreciate it
All the best
S.M.
Hi there,
I am using a struct and a Class whose elements may be arrays. I would like though, for these arrays to be dynamically allocatable when I declare them in the Class and main code; how is...
Hi there,
I am using a struct whose elements may be arrays. I would like though, for these arrays to be dynamically allocatable when I declare them in the main code; how is it supposed to be...
Thanks!
have a nice weekend
s.
Hi Salem, yes, it is indeed so; I actually found a bug on a previous code I wrote when I ported it from Linux to Mac. It was actually a bug that for some reason wouldn't raise problems under linux....
Hello Salem, thanks for replying; yes, actually everything was allocated and it works fine on another machine. Anyhow, I think I can solve it by recoding it in a different way.
Thank you very much...
Hi everyone;
Unexpectedly I am receiving a dynamic memory allocation error in my code when running on a Mac OS X (10.5), while that does not happen when I compile and execute the same code on a...
I meant to return from the function because this is the last command to run; should I use break or return would exit the function directly?
On the other hand, I just realize that I cannot use...