Search:

Type: Posts; User: atac

Search: Search took 0.00 seconds.

  1. That code I posted was just a quick example, in...

    That code I posted was just a quick example, in my actual program I checked for a NULL file and used free() for the dynamic memory alloc. But I wasn't aware casting malloc was bad practice, thanks.
  2. Nevermind, I just figured it out! I wasn't...

    Nevermind, I just figured it out! I wasn't terminating the strings in the array itself.


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>


    int main(int argc, char *argv[]){
  3. Reading from file into array, some strings aren't terminated?

    I'm making a Jeopardy game and when I read text from a file into arrays to set the categories, questions and answers a couple of the strings are not terminating and they are printing that junk box...
Results 1 to 3 of 3