Search:

Type: Posts; User: jtullo

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,210

    ok i figured it out, i didnt allocate memory for...

    ok i figured it out, i didnt allocate memory for the string. Wow, funny how I worked on this problem for about an hour and then 10 minutes after I post this, i figure it out. weird how that works...
  2. Replies
    2
    Views
    1,210

    cant get strcpy to work

    This is just a start of my code. I am trying to read a file with a list of names followed by a space and a status, either 1-up or 0-down. So the file would look like this if it had 2 records....
  3. Replies
    2
    Views
    3,532

    Count number of letters and numbers in a file

    Hello,

    I wanted to know if there is a better way to code this situation of counting the number of occurances of each letter(case insensitive) and each number in a file, disregarding other...
  4. Replies
    2
    Views
    3,440

    String to int using strtok and strtol

    I just had a quick question. I need to put a number from a string and convert it to int/long/or double. the number is a price so it has a decimal and 2 numbers after, such as 48.78. When i try to...
  5. Replies
    3
    Views
    1,878

    Getting rid of array index brackets

    Just seeking advice. I have a program for homework that I completed and runs great. The program encrypts letters. A = Z, B = Y, C = X etc. and adds 3 to ascii value for digits. The only problem is...
  6. Replies
    3
    Views
    1,519

    Got it figured out!! thanks for your guys input....

    Got it figured out!! thanks for your guys input. Here is the code i finished with, Just another question. If you think it should receive any changes or could improve please say so. I am always up...
  7. Replies
    3
    Views
    1,519

    encryption algorithm

    I am fairly new to coding in c. I am having trouble writing a function to read a character and encrypt the character so that
    A becomes Z
    B becomes Y
    C becomes X
    and so on.....
    same with...
  8. Thread: Memory Leak

    by jtullo
    Replies
    7
    Views
    2,640

    error fixed

    I found the error, it was my allocation. When i allocated memory for data.name my code looked like this:

    pNew->data.name = (char*)calloc(sizeof( strlen(item.name) ) + 1, sizeof(char));

    but i...
  9. Thread: Memory Leak

    by jtullo
    Replies
    7
    Views
    2,640

    I free my data.name before i free pCur. The ...

    I free my data.name before i free pCur. The problem is that the program crashes when i put free (pCur->data.name); anywhere in the function
  10. Thread: Memory Leak

    by jtullo
    Replies
    7
    Views
    2,640

    I see what your saying, i changed the wich doesnt...

    I see what your saying, i changed the wich doesnt call deleteNode. It destroys my list but I am still having a memory leak. my new deleteNode looks like this.
    insert

    NODE* destroyList(NODE...
  11. Thread: Memory Leak

    by jtullo
    Replies
    7
    Views
    2,640

    Memory Leak

    Hi, I am fairly new to c programming. And im having a little bit of trouble with allocating memory. I have included a class project that i am almost done with, but i need help with my destroylist...
Results 1 to 11 of 11