I was wrong, indeed this wasn't the problem:
the problem was assigning a pointer string to an array string. (e.g.: char fullname[10] = "hello"; is only allowed if it's an initialization. but char...
Type: Posts; User: narniat
I was wrong, indeed this wasn't the problem:
the problem was assigning a pointer string to an array string. (e.g.: char fullname[10] = "hello"; is only allowed if it's an initialization. but char...
I'm somewhat new to C so I'm gaining experience and this is for practicing. thank you for the suggestion.
I had already read about shallow vs deep copying but I had never "gotten" it like...
Please look at the code below, it's going to save a simple contact address in a database file, but it's not working. My guess is that the database_add function(at the bottom of the code) is not...
Oh haha, you're right. Of course skydiving is better. :D
Thanks.
Thanks, this is logical.
So what's wrong with just recompiling the affected source file whenever we remember? E.g: When we see our change did not have any effect. (I guess you want to say: on...
I know "Make" is a cool software and I've been using it for a while, but when some people reason about its benefits, and when they explain how it helps programmers with managing the unwieldy...
Salem, your replies are very helpful, thanks. I did that because I thought having 5 loops inside a function is scary... . I fixed it now and it's working fine.
Two arrays are sent to a function and:
step1_ segments of each of them is used for producing new arrays, and then
step2_ initial arrays are completely replaced by the new arrays.
Here's the...
Excuse me I'm not answering your question but I'm just studying about GA and I have a basic question I think you can answer. Do I need to produce the exact same number of children in the cross-over...
Salem thanks for the answer, sorry for my previous post, I sent it simultaneously with you, yes I used malloc. Thanks a lot.
Sorry, I've realized the answer but I didn't know how to delete this post.
Here's the code:
unsigned int* generatePopulation(const int);
int main(){
const int POPSIZE = 3;
unsigned int* population;
population = generatePopulation(POPSIZE);
I read your message.
All in all, the messaging system here is REALLLLY strange because at the time I sent you that message, it just vanished! and now that you have replied it's there! And now I...
Hey bruteforce sorry for the delay, no I'm interested :) But it's night here when it's day somewhere else so it's hard to be in step :) I apologize.
I'm thrilled to see your fast solution. Also...
This is interesting last night I wrote a list for myself and now you've asked this question :)
So it's destined that it has to be shared with you :) Here's a list of useful commands I think you...
Yes this is strange. No my computer is 64 bits, my OS is Windows10 but indeed I should say it's Ubuntu since I'm using WSL (which is a Linux distribution developed by Microsoft for Windows users,...
The interesting thing that I can not still understand is your code and my code both give 419872311 as the result of the 11th input on my own computer (tried that using cat input11.txt | ./program)...
WoWw...!! Yes it works!! Thanks very very much! I will not submit it because it's not my own work but I compiled it using custom input and gave the exact input (the 11th one) that failed my code to...
Hey bruteforce, thanks for your help. I tried long long too but it says the answer is wrong. About using one array, I also did that but it's still wrong.
Here's the code using one array instead of...
Hey, thanks, got it. Would I ask another question too? There's a competitive programming question here: Best Index | Basics of Input/Output & Basic Programming Practice Problems | HackerEarth and...
I'm trying to test an input(which is a text file) on my code but instead of using file-I/O I added command line arguments to main, initial lines are like these:
int main(int argc, char** argv){...
Yes that's exactly its meaning. So they have somehow ADDED something the C syntax in favor of their own need!?!? o-O It's very mysterious :D:D
(Excuse me I reply late) So without pointer it will be impossible(I didn't get it)?
While writing a program for an AVR microcontroller I came across this weird-looking function that was generated automatically by the IDE for an interrupt service routine (ISR):
interrupt...
I'm checking SDL and I see in the initial steps that a pointer of type SDL_WINDOW is made and then when passed to some other functions a window is initialized. I wonder how I should have guessed...