oh sorry, pass should be temp. I have been cutting and pasting around to try and figure out what the error was complaining about.
int len;
char temp[15];
char *ptr;
get...
Type: Posts; User: Drainy
oh sorry, pass should be temp. I have been cutting and pasting around to try and figure out what the error was complaining about.
int len;
char temp[15];
char *ptr;
get...
Hi,
I am trying to get my head around a warning, I have searched about but found no examples that are similar to my case.
The warning I get on compiling is;
assignment makes pointer from integer...
Thanks for the quick replies, have managed a solution using malloc.
Thanks again.
Hi,
I am having issues compiling a program with cc on a fairly old unix system, I understand that I need to follow C standards strictly but I can find no way around this.
array(int n)
{
int...
Hi,
I am currently having issue with a fork command I am issuing, I am attempting to use fork to create x number of identical processes however it is creating the required amount and then the...
void showMenu(int x);
int confirmFile(char *fn[]);
int closeFile();
char *fn[0];
char *file[0];
Sorry, poor effort on the code pasting! This is my prototyping and variable declarations....
void showMenu(int x)
{
int option; //set variable for menu choice
char rtn; //clear screen
system("clear");
printf("### 2 - Close File ###\n");
printf("What would...
FILE *fp; //This is declared at the very top of program. outside of any functions
int main(int argc, char *argv[])
{
int x;
if(argc == 1) //if only 1 entry in array then go to menu
{...
Hi,
Hopefully a quick one.
I have recently been doing some C Programming again after not doing any for 4-5years.
So, I have gone a bit all out to make a program that does a little bit of...
Thats great thanks :)
Hi,
Im having a really simple problem.
I have an if statement to check if an input from a user is empty or not, if it is then the program needs to take one course of action. if it isnt then it...
Sorted! (get it? sorted...) :D
Cheers
Ok thanks, ill have a read up on that later :)
Im completing a piece of work weeks before its due deliberately so I can sit back and refine it and spend some time improving it before hand in.
Hi!
Ok, I honestly have exausted my mind over this one.
I have an array of 12 structures, each one has a name and several other double variables.
I am trying to sort the entries in the...
Thanks!
I used strcpy in the end.
Hi,
Sorry I keep getting an error and im not sure what it means;
cc: Error: testfile.c, line 441: In this statement, "holders[pos].name" is not an
lvalue, but occurs in a context that...
Ok, while ive solved one issue, its created another which I cant get my head around.
void shop::select(int choice)
{
if (choice == 1)
{
Thank you
I just had it a bit mixed up in my head. :)
Apologies.
That was a fairly dire explanation by myself
ok.
So if I had a header file called shop. Inside it was a definition for a class shop
class shop {
public:
Hi,
Im really new to all this so apologies for any stupid questions but basically I have a program I am making.
As its for a coursework piece I wont go into detail, however put simply there is a...
thats the one :D
Cheers
Hi,
Many thanks to hk_mp5kpdw for answering my previous post, was perfect thanks!
Since this is a different problem I figured a different topic would be wise, this time it should be fairly...
Cheers that was perfect!
Ive managed to understand all that and apply it perfectly, its reading in and outputting just how I wanted.
Sorry to be a pain but I just had a few more issues.
How do I...
Hi,
Im completely new here so please bear with me if I screw things up!
Basically I have a piece of coursework along the lines of making a football league program in C. Looks easy in theory but...