Whenever you have doubts in the macro just give
gcc -E filename.c
may be gcc or cc
This will show you how the macros are expanded
Type: Posts; User: Alexander jack
Whenever you have doubts in the macro just give
gcc -E filename.c
may be gcc or cc
This will show you how the macros are expanded
Appreciate your effort
Don't do your home work here !
why not you prefer to call the function inside switch case instead of defining inside it.
Have any specific reason !!!!
why switch case outside main function !!!
Nope, Break is used to come out from the loop , it is used to exit from the loop not from the code.
Hope this example code will help you
int example(const char *str,...)
{
int i;
int num_count=atoi(str);
This code works fine for me
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <stdlib.h>
I am using GCC V4.1.2
char ** getcommand(int loc);
This prototype says no error
As ganesh said problem may be in your code, other wise paste the error message here!
but Im know for...
I think it was run as a background process only , but it might print some lines which makes you to think as a foreground process.
If my understanding is right ?
Please try this $ firefox...
By make the number as a string we can easily find its length ,
so I believe that the following code will give you an idea to achieve your requirement
while(scanf("%d",&c))
{
...
Have this as an idea , the buffer contains all the file (example size 20000) ,
int main()
{
FILE *fp= fopen("filename", "r"); //open file
char *buffer =malloc(20000); ;...
Im totally agree with rogster001 , since you are a beginner it is difficult you to design this animation stuffs.
so it is better you to use Simple DirectMadia Layer ( SDL ). SDL is a free and open...
C is mainly used for CUI ( character user interface ) , for animation you must need a GUI , so I do not think that you can achieve this using C with out any compromise.
I suggest you to prefer...
Hope this code would give some general idea to achieve your requirement ,
// simple sorting algorithm
void bubble(int a[],int n)
{
int i,j,t;
for(i=n-2;i>=0;i--)
{...
Probably you can post this question is some other MAC related forums
like Character arrays in Xcode - Mac Forums
Try this code , This is a simple code for comparing values ,
#define MIN_VALUE 10
#define MAX_VALUE 50
int
main ( int argc, char *argv[] )
{
I think the program is not hung , after the the 2 seconds child process killed the parent ,
that makes you to feel like the program is got exiting.
When the child was sleeping the parent start...
Actually we have answered here
Array copying problem
You can trust some data structure which is meant for the dictionaries
like Linked list , Tries , Hashes.
Based on your requirement you can use any of it.
grumpy is right , I gave solution for GCC 4.1.2.
may I know which compiler u r Mr.u.unmesh?
You can use any compiler , but I hope that there is no big and notable difference would be
there in...
You can see the details in this file /usr/include/libio.h
Refer this site for more details
http://tigcc.ticalc.org/doc/stdio.html#FILE
code is nice use perror to print the error message
for ex :
if(fp==NULL)
{
perror(err);
exit(1) ;
}
Please refer this site , you may get a clear picture
http://www.ats.ucla.edu/clusters/common/computing/parallel/mpi_examples/send.c
Also check the resources using ulimit -a command, I think you are facing some lack of resources issue