Thanks. I found the function was only called in one place, and copied all the code in place of the function call. It works now.
Type: Posts; User: wolf
Thanks. I found the function was only called in one place, and copied all the code in place of the function call. It works now.
I'm developing using VC++ 6.0. The code compiles and links fine using it.
However, it needs to be embedded and the device requires the MS-DOS C51 compiler.
I'm trying to debug and received this compiler error message:
Unable to optimize func1(). Compile stopped. Use the following workaround:
#pragma OPTIMIZE(4)
func1(void)
{
...
} // end func1...
when you put it like that. I understand now.
Thanks for laying it out.
wolf
good for precise formatting.
Not so in this case. I've got part of it to work using multiple strchr and atoi.
Thanks quzah and Javariel. I do appreciate your help.
wolf
I should be more specific. Sorry.
using this code
char line[40], *tag, a[40], b[40];
int n = -1;
strcpy(line, "This is an order for (XYZ-2) some order");
sscanf(line,"%s %*d %*s",a, n, b);
no change.
char line[40], *tag, a[40], b[40];
int n;
strcpy(line, "This is an order for (XYZ-2) some order");
tag = strchr(line, '(');
strcpy(line, &tag[1]); // get rid of all text before and including...
Can someone please help me.
I don't understand why this doesn't work.
char *line, *tag, *a, *b;
int n;
strcpy(line, "This is an order for (XYZ-2) some order");
Forgot to include the error checking, but it is in place:
if (!p)
exit(1);
if (!n)
exit(1);
Will try them as static, but I thought static variables could not be changed?
I appreciate...
I have two large arrays of structures I could not declare as arrays (array too big error) but could allocate dynamically
n[138] and p[317]
and am trying to pass them as parameters to a function....
Awesome. Thanks Salem.
With a dynamic 2D array:
int *arr;
arr = int *calloc(maxrow*maxcol, sizeof(int));
how do you reference the different elements (alternate notation arr[row][col] will not compile). Is pointer...
thanks for the response
Can this be done?
typedef struct item_s
{
int id, amount;
struct item_s *next;
} item_t;
typedef struct cust_s
{
Thanks all. Problem solved.
I am completely new to this, so please bear with me.
I'm using Borland C 4.5.
The array represents a 2D battlefield, with 'units' represented by a single integer in it, or empty.
The output file...
I don't want to reference outide my array, so is this test valid, or will the second expression try to evaluate is the first is false?
if ((row+1 < maxrow) && (array[row+1][col] == EMPTY)
Also,...