Right. I'll do that.
Type: Posts; User: farukyaz
Right. I'll do that.
I'm already more concerned about it that's why I've finished it before posting now here. Btw, the code here is wrong but anyone who know C++ better than me can take and correct it.
Yes but only a few lines of it is the concerned part and it's enough to help people, indeed I'd willingly leave them here. But I think I must have the right to delete the unconcerned part of the...
What's the point of you making this issue more public? And what's the point of you putting me in more difficulty? Please.
Executed many times with different values, and it works great.
It works!!! Yes! Thanks for taking serious and helping :)
I didn't understand it right, for instance in the following code, what should I make with "int size"? Thanks in advance.
void getinfo(int size, struct Student Stud[size]);
No, you got it wrong. It's a data structures assignment and the course is made up with both C and C++ codes, because the aim is to teach data structures, rather than a programming language. So it's...
I've finished my assignment in C. But I learned I'm supposed to submit a C++ file. Now I'm trying to convert my program to C++. All I could do is change #include<stdio.h> and #include<stdlib.h> with...
Yes, I wanted to malloc them. Thanks for the code!
Thanks a lot! The link helped a lot.
Well I have the struct here, an array of structs actually. I have to malloc it, and then free. How is it done, in codes? Thanks for any help. I'm driven crazy for days but I can't do it.
...
Thanks a lot, things are getting clearer now.
Thanks for the reply. I understood that some variables are stored on the stack because they have limits or a certain value, right? And why isn't a pointer, in your code "int *z" stored the same way?...
I never quite understand the use of malloc. When I declare some variables, doesn't the system allocate some random memory for them to be placed? In what cases should I use malloc?
I have a struct...
Thanks a LOT!!!
Yes I removed the * .Program seems to run well at first but stops running at some time. Maybe it's not caused by the struct or the pointer. I'll check my entire syntax now.
By the way, if I remove...
I tried them. Compiler doesn't give an error but it says "warning:assignment makes integer from pointer without a cast" How can I prevent it? And thanks
I've tried that but my program stops running when I do that :/
I have a struct like this:
struct Person
{
double number;
int age, *exampoint;
}Prsn[50];
I want to acces the pointer defined inside the struct later. How can I call it? I tried this,...
Thanks a lot! I understand all you suggested.
By the way yes I know arrays very well, as long as it's only array.
I know arrays very well but I wasn't sure about an array of struct, and because my compiler still gives a lot of errors I had to ask it.
The link was helpful, thanks. And your code seems like what I want, if I can figure out the for loop I will use it. Here I have 81 cities and 81 corresponding populations in my POPULATIONS.TXT file....
Yes, but after being directed from here too I found fscanf the most suitable command, but I just don't know how to use it and I couldn't find enough information on the internet either so that's the...
I'll go with fscanf. Thanks a lot!!!