Hi,
Yes that works. Thanks. :)
Any reason why it has to be declared/used that way? and not
void display_seats(char **seats);
Type: Posts; User: Krupux
Hi,
Yes that works. Thanks. :)
Any reason why it has to be declared/used that way? and not
void display_seats(char **seats);
Hi,
If you mean
display_seats(&seats[0]);
That doesn't work... :(
Edit: Thanks for all the answers. :)
Hi,
How do I pass 2D array to a function correctly?
Here's my code which doesn't work.
Hi,
I've given a project to implement the fastest database search algorithm in C.
So my question is does anyone know the fastest algorithm? and perhaps an example source code?
I've searched...
Thanks for your reply.
So ENTER key can be either '\n' or '\r' ?
If so, how do i know when pressing ENTER key will returns '\n' or '\r' ?
Thanks.
I have this code,
#include <stdio.h>
#include <conio.h>
int main(void)
{
char test;
test = getch();
So what I get from your replies is,
Structures are to be declared outside main() when other function need access to them.
Otherwise, they may be declared inside main().
(Correct me if i'm...
#include <stdio.h>
void grade(struct student_info *);
int main()
{
struct student_info
{
int examno;
Hmm, I see, I didn't know that.
But anyway, thanks for your reply. :)
Okay, for example I have this code,
char str[20];
char chr;
int num;
/* Case 1 */
printf("\nNum: ");
Can I use getch() or getche() ?
If not, may i know what's wrong with them?
i see, thanks for the replies.
>scanf( "%*c" );
>scans for one character and doesn't assign it to a variable.
if that the case, what's the difference between putting
scanf( "%*c" ); and scanf( "%c" );
i've tried both,...
#include <stdio.h>
int main()
{ struct student {
int snum;
char name[30];
int age;
char sex;
float score;
};
struct student info;