okie i learn something new
thanks :cool:
Type: Posts; User: zell
okie i learn something new
thanks :cool:
thanks alot!!!
it finally works :p
wat with the \r anyway? wat does it means?
this \r has been driving me crazy for like days .......
once again thanks alot!!! ;)
i already clean up those malloc already
i could get the correct result too if i run the program in windows
but i cannot get the result running it in cygwin :(
this is wat i get in cygwin
...
here it is
setpath /usr/bin/
w -s
//suppose to have 1 more feedline here, but cannot display in the post here
i also tidied up the code from some of the advice
#include <stdio.h>
#include...
i really dun know wat is happening.....
if u were saying the allocating 10K for every single line, but our lecturer wanted us to allocate that
as for the token = malloc(100) ;
i already remove...
ok
but now my main problem is with the
//printing for debugging
printf("path = %s\n", path[1]) ; //this prints path = /usr/bin/
printf("parameter = %s\n", parameter[0]) ; ...
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <string.h>
int main(int argc, char *argv[])
{
//check correct num of...
[QUOTE=Salem]> why is this so?
Probably luck.
cos i was thinking there is some bug with cygwin
this is the part of the code
printf("path = %s\n", path[1]) ;
printf("parameter =...
printf("%s\n", path) ; //this print /usr/bin/
printf("%s\n", parameter[0]) ; //this print w
strcat(path, parameter[0]) ;
printf("%s\n", path) ; //this print wusr/bin/
...
okie i have the reading of lines done
hope i am doing it right
FILE *f ;
f = fopen(argv[1], "r") ;
char *line[100] ;
char *word = malloc(10000) ;
int count = 0 ;
hi all
i needed to do some compilation with unix function like fork() and stuff
so i went to download cygwin
but i do not seemed to be able to work there
there issn't folder for me work with...
as in like this?
char* newpath = malloc(100) ;
newpath = strcat(path, parameter[0]) ;
printf("%s\n", newpath) ;
this gave the same...
how do i do that?
i am sorry because i am rather new to c and really dun understand the malloc and buffer thing
thanks for help
this is the whole code if needed
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <string.h>
maybe i add the declaration of the variables to be clear
char *parameter[100] ;
char *path ;
i want to append my parameter to my path string
but i just cannot get the desired result
my...
printf("%s\n", path) ; //this print /usr/bin/
printf("%s\n", parameter[0]) ; //this print w
strcat(path, parameter[0]) ;
printf("%s\n", path) ; //this print wusr/bin/
...
now i come to another problem
i want to create a another window for the sliding bar itself
how do i do it?
thanks :p
did a pretty simple one, but enough for my case :D
u know those u adjust to the left and right to achieve different values
something like a scroll bar on the right of the IE browser
anyone got any sample code on how to create a sliding bar in opengl?
i try looking on the net, couldn't find one.
thanks alot in advance
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int id;
int shared_mem_id;
int *s;
i dun get it :confused:
so wat i am supposed to do? :confused:
#include <glut.h>
void mydisplay()
{
glClear(GL_COLOR_BUFFER_BIT) ;
glBegin(GL_POLYGON) ;
glVertex2f(-0.5, -0.5) ;
glVertex2f(-0.5, 0.5) ;
glVertex2f(0.5,...
cool, this is a nice technique
thanks :)
as topic says....
i know there is another type called jumbo ethernet frame which is 9000 bytes.
but since increasing frame size will help increase efficiency, then why ethernet frame restricts to...