hint:
int mysql_query(MYSQL *mysql, const char *query)
Executes the SQL query pointed to by the null-terminated string query. Normally, the string must consist of a single SQL statement and...
Type: Posts; User: wintellect
hint:
int mysql_query(MYSQL *mysql, const char *query)
Executes the SQL query pointed to by the null-terminated string query. Normally, the string must consist of a single SQL statement and...
hmm,
I was always taught that an application's stack started at the very end of the available application RAM, and worked its way down into the dynamically available memory
try this:
all: birthdays
birthdays: birthdays.o
gcc -o birthdays birthdays.o
birthdays.o: birthdays.c birthdays.h
gcc -c birthdays.c
you need to declare "d" as an int before you can use it ;)
And this bit needs to be re-written
for(count = "%d", start; count <= "%d", end; count++)
printf("%d");
Personally, I would have your function return 0 when the char is a digit and -1 on error
...but this is probablyon a personal thing
Where is the pointer "menu" created? All I see is it's being passed to functions and a comparison being made
functions need to be independantly created - outside of other functions. main() is a function itself and is the default function started by running the program.
To create a function called "foo"...
You could use a switch() statement to check the contents of ch, and if it's below a certain ASCII character value print something else instead ;)
And straight from the man page malloc(3):
I love UNIX for the online documentation :)
printf() would be your friend here. You can use justification with it.
And your question sounds a bit homework-ish...
IMHO you're just starting C, so don't worry about GUIs at the moment. Get to grips with the concepts that the book you bought is presenting (I have that book too)!
When you feel ready, may I...
free(3) returns memory space allocated by malloc(3) and the like back to the OS, this does NOT mean it blanks out the memory.
What you're reading is the contents of the memory location pointed to...
How many of the nodes are you trying to remove?
All of them?
Your if() statement should test as follows:
if(type != 's' && type !='u' && type != 'f')
Think of it like this, balance has to be reduced by an amount (probably the withdrawl amount). Then you can test if balance is 0 or less and take appropriate action.
Yes, an if() statement is...
You could try this:
make empty entries a NULL, then malloc memory and copy non NULL chars to the malloc'd memory one-by-one
something like this:
#include <stdio.h>
int mysub(FILE *ptr);
int main(void)
{
FILE *ptr;
I see nowhere in your code where balance will get to 0
You never change the value of balance - so how can it reach zero?
you could also lookup the ascii value for the character '>' and use that instead in the comparison
the only test against balance I see is here:
if (withdrawal[x] > balance + deposit[x])
{
printf ("***Withdrawal amount exceeds current balance. Please re-enter!***\n");
withdrawal[x]...
perhaps you could try to wrap them all in one function (untested code):
llnode *head = NULL;
void create_list()
{
llnode *tmp;
llnode *ptr;
I've always wanted to know:
Is it better to store financila data as a float: eg. 19.99
or as an int: eg 1999
(both values are to represent the same some of money)
Which would be better to...
Indeed it does - even the examples are C based:
http://www.gtk.org/tutorial/c58.html#SEC-HELLOWORLD
Far be it for me to do someone's homework, but it seems your being asked to do use a binary tree instead of a linked list.
Binary trees increase the speed of searches by halving the number of...