Search:

Type: Posts; User: narniat

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    5,064

    I was wrong, indeed this wasn't the problem: ...

    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...
  2. Replies
    4
    Views
    5,064

    I'm somewhat new to C so I'm gaining experience...

    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...
  3. Replies
    4
    Views
    5,064

    record isn't added to file

    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...
  4. Oh haha, you're right. Of course skydiving is...

    Oh haha, you're right. Of course skydiving is better. :D


    Thanks.
  5. Thanks, this is logical. So what's wrong...

    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...
  6. Changes in header files and make to the rescue

    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...
  7. Salem, your replies are very helpful, thanks. I...

    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.
  8. Change both array elements and the array address in a function

    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...
  9. Thread: Sudoku GA

    by narniat
    Replies
    5
    Views
    4,235

    Excuse me I'm not answering your question but I'm...

    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...
  10. Salem thanks for the answer, sorry for my...

    Salem thanks for the answer, sorry for my previous post, I sent it simultaneously with you, yes I used malloc. Thanks a lot.
  11. Sorry, I've realized the answer but I didn't know...

    Sorry, I've realized the answer but I didn't know how to delete this post.
  12. static array is needed but size is not determinable at compile time, what do I do?

    Here's the code:

    unsigned int* generatePopulation(const int);


    int main(){
    const int POPSIZE = 3;
    unsigned int* population;
    population = generatePopulation(POPSIZE);
  13. I read your message. All in all, the messaging...

    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...
  14. Hey bruteforce sorry for the delay, no I'm...

    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...
  15. Replies
    7
    Views
    4,944

    This is interesting last night I wrote a list for...

    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...
  16. Yes this is strange. No my computer is 64 bits,...

    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,...
  17. The interesting thing that I can not still...

    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)...
  18. WoWw...!! Yes it works!! Thanks very very much! I...

    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...
  19. Hey bruteforce, thanks for your help. I tried...

    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...
  20. Hey, thanks, got it. Would I ask another question...

    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...
  21. input files using command line arguments possible?

    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){...
  22. Yes that's exactly its meaning. So they have...

    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
  23. (Excuse me I reply late) So without pointer it...

    (Excuse me I reply late) So without pointer it will be impossible(I didn't get it)?
  24. Unfamiliar syntax of an ISR of a microcontroller

    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...
  25. Beginner Question: The main reason a pointer is used to create GUI window

    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...
Results 1 to 25 of 42
Page 1 of 2 1 2