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...
Type: Posts; User: jtullo
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...
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....
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...
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...
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...
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...
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...
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...
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
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...
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...