Thank you it's working now. I forgot strings needed space for the null character
Type: Posts; User: abmoh
Thank you it's working now. I forgot strings needed space for the null character
Okay thanks. The bank array is set to 100 and numberofaccounts is initialized as 0.
Here is the entire code so far:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX...
Hello!
I am playing around with C and i tried to create a simple program that stores account numbers and names in a struct array.
To register these parameters i used a int function called...
i want to write a simple country code program. the program will ask the user to enter a country code. if the country code number matches to the struct then it gives out a result
if the user enters a...
Thank you for your reply. the solved the first issue by initializing my array to zero a[i]=0
but about the second point. i might have been unclear with my explanation but what i want my program to...
So the problem that i have with my code is the following:
1. when i run the program and enter view (v) the array is suppose to be empty but instead i get this [21696 1 ]. after i reset the array...
So first of my program is written in a foreign language, sorry about that.
What i'm trying to program is a calculator that sums upp numbers. And the program will terminate when the user writes a...
okay but what happens to an array when it is deleted
for example
[10, 20, 30, 40 , 50]
how does it work when we delete index position nr 2 = [30]
Can someone explain to me the process of the array deletion.
steg by step so that i understand the whole process thank you. please dont forget to explain what happens in every loop and what happens...
I did not try to run the code since i did not understand it. i have a deadline that soon expires and my teacher wants me to fix the issue.
Everything seems to work except for the fact that i cant...
i have looked at both codes. but unfortunately its a little bit too complicated for a beginner like me
i was wondering is there any possibility with my current code at hand that there is a ...
i just tried to remove these three lines but still nothing :(
I was able to change so that my savetofile inserts antal_varor
so that when it comes around to readfromfile it already contains the the right nr of antal_varor
but the new issue is that my output...
I will as good as possible try to explain the issue that i have with my program. in my int main () i have declared that int antal_varor=0.
so when my readfromfile function is called upon
void...
What should i insert into my while loop to insure that it does not loop more than required?
void readFromFile(char file[], int *antal_varor, struct storagemanipulation *inventory)
{
...
Thank you for helping. this is my current code.
it is still not working and i am stuck. Dont know what to do to fix this problem
void readFromFile(char file[], int *antal_varor, struct...
John i declared the array as you said in the two functions. and i got rid of my file parameter but i still cant read back my saved inputs.
do you mind posting an example using my program?
Thanks
I am new to c programming language so bare with me.
I have written a database that stores products using a struct. This database inserts new products (product number, product name and product...
Thaaaank u soooo much man. U dont understand how much i have put into fixing that issue.
Dude u are awesome.
I have written a simple database program that stores products. this database has a few functions one of them is a delete function. this delete function's job is to delete a certain product.
...