I would be most grateful if you could post/write a code for me, please.
I really need it, either convert decimal to roman or roman to decimal.Thanks.
Please read:
I would be most grateful if you could post/write a code for me, please.
I really need it, either convert decimal to roman or roman to decimal.Thanks.
Please read:
No, I want like that 87456 - we have 5 different digits (It's all what I want)
one more exmp - number 113452266 - we have 6 different digts
I did it with two loops but i don't know - how to do it with 1 loop and pointers :)
so you have a number defined as
unsigned int myint = 113452266;
and you want to extract the number of unique digits from myint?
I read this posting a few times and I'm at a loss..Do you mean if you have a number say:
unsigned int myint = 87456;
do you want to extract from it 8 - 7 - 4 - 5 - 6?
So would some compilers know that only freeing the list should free all its indices, or would I always get a memory leak with that? Either way, I want to know if there's an ANSI standard on this... which is probably the second method here if anything.
Thanks in advance for clearing up my confusion!
Number one its the memory manager that handles allocation/freeing of memory not the compiler. The compiler generates the code that calls the memory manager.
Basically you have to call free for each successful malloc you call....or you could exit the program and let the exit procedures clean up the memory for the program...
Not sure why this is located in the 'Window and Desktop' section..Check out the link below:
You'll find a solution that uses C and another that uses bash script.
This should get you started:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define MAX_SITES 10 /* maximum number of sites allowed */
typedef struct
{
int site_id_num; /* id number of the site */
int wind_speed; /* the wind speed in knots */
int day_of_month; /* the day of the month written as dd */
int temperature; /* temp in celcius */
} measured_data_t;
int main(void)
{
int i = 0;
measured_data_t mydata[MAX_SITES];
for (i = 0; i < MAX_SITES; ++i)
{
fprintf(stdout, "collecting data for %d site\n", i + 1);
fputs("enter site id number->", stdout);
fscanf(stdin, "%d", &mydata[i].site_id_num);
}
for (i = 0; i < MAX_SITES; ++i)
{
fprintf(stdout, "data for %d site\n", i + 1);
fprintf(stdout, "site id->%d\n", mydata[i].site_id_num);
}
exit(EXIT_SUCCESS);
}
Number one its assignment to a structure and you have some major problems with your code...I'm looking at it right now.
i do, i really do. i wrote those codes and i took long time for me. i'm trying to understand arrays and functions .
No one's doubting that you wrote the code but we need to see what you have for the second part of the assignment.
If your at a loss, try this link:
thank you very much. now how can i modify the functoin to convert it to a recursive function. this is important .
Its really not that hard to convert what you have, just make sure to add a print statement so you can track what your recursive function is doing. When the function works remove the print function.
int arrayToplam (int *a, int size)
{
fprintf(stdout, "ans->%d\n", a[size - 1]);
return 0;
}
Note to help you, you have to show some effort...
Added a few things
#include <stdio.h>
#include <stdlib.h>
int arrayToplam (int *a, int size );
int main()
{
int i, j = 0;
int *x = (int*)NULL;
printf(" Kac Sayi Toplamak Istiyorsunuz: ");
scanf("%d",&i);
x = malloc(sizeof(int)*i);
if (!x)
{
fputs("could not allocate memory!\n", stderr);
exit(EXIT_FAILURE);
}
for (j = 0; j < i; ++j)/*just some data to play with*/
x[j] = j + 1;
printf("\n Sayilarin Toplami: %d \n\n",arrayToplam(x,i));
free(x);
x = (int*)NULL;
exit(EXIT_SUCCESS);
}
int arrayToplam (int *a,int size)
{
int b, Toplam=0;
for(b=0;b<size;b++)
{
Toplam += a[b];
}
return Toplam;
}
Look at how I displayed the binary number...its much easier to read, besides that the code code looks O.K.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int reversebits( unsigned int n ); /* prototype */
int reversebits(unsigned int n)
{
unsigned int temp = n;
int i;
for(i = (sizeof(n) *8-1 ); i ; i--)
{
temp = temp | (n & 1);
temp = temp <<1;
n = n >>1;
}
temp = temp | (n & 1);
return temp;
}
int main()
{
int number;
int reversednumber;
int i;
int temp;
printf("\nEnter the number: ");
scanf("%d", &number);
reversednumber = reversebits(number);
printf("\n\n\nBits in the original number:\n\n");
for( i = 0; i < 32; i++)
{
if (0 == i % 4) fputc(' ', stdout);
temp = number >> i & 1;
printf("%d ",temp);
}
printf("\n\n\n\nBits in the reverse order:\n\n");
for( i = 0; i < 32; i++ )
{
if (0 == i % 4) fputc(' ', stdout);
temp = (reversednumber >> i ) & 1;
printf("%d ",temp);
}
fputs("\n", stdout);
exit(EXIT_SUCCESS);
}
From what I've read over the last twenty-four hours I can only assume your trying to learn C piece meal - one post at a time...Get yourself a good book on C and read. This trying to learn C by trail and error will never amount to anything...
If you need some good titles then try
The C Programming Lanaguge
The Complete Reference C
Please continue with C its a great language once you get a few things straightened out.
The simple answer for you unpredictable program is - bad programming practices.
Don't have functions return pointers to variables on the stack
The behavior you describe is compiler dependent. If I had to venture a guess - Its because the compiler is optimizing away the char array when the printf function is commented out...but who knows without an audit of your compiled program..
Number one, your trim function doesn't return anything...so if I had to guess str is getting whatever is in the eax/rax register..
str = trim(str);
I compiled this and it worked fine
#include <stdio.h>
#include <stdarg.h>
void write_to_log(const char *template, int nargs, ...)
{
int val = 0, val2 = 0;
va_list ap;
va_start(ap, nargs);
val = va_arg (ap, int);
val2 = va_arg(ap, int);
printf(template,val,val2);
va_end(ap);
}
int main()
{
write_to_log("client speed: %d, %d\n",1, 5, 8);
return 0;
}
Program output - client speed: 5 8
Please look at the link I attach earlier
hi,
#include <stdio.h> int* get_int() { int arr[100]; arr[0] = 5; printf("arr %p\n",arr); return arr; } int main() { int* p = get_int(); printf("got %p\n",p); return 0; }
for the code above I get this warning message:
test-heap.c: In function ‘int* get_int()’: test-heap.c:5: warning: address of local variable ‘arr’ returned
My question is whether this above approach is right or wrong. ie getting the storage allocation for the pointer in main function done indirectly through the function get_int. If I call get_int repeatedly in a loop then is it necessary to free p before the beginning of each iteration as for different iteration it is supposed to get different allocation but I am not sure what happens to the previous allocation. Is there any possibility of memory leak? Suppose I allocated a pointer in get_int instead of creating an array then would that be treated differently from within main I mean allocation/deallocation(calling malloc/free) wise?
Thanks.
Its wrong because the local variable 'int arr[100];' is only current/valid until the function returns.
Nevermind my last question, I just realized that I can just redirect the output to the socket (assuming this is possible which I think it is) and that should work.
You really should take the time and post something organized, its would save everyone a lot of time and effort.
From what you posted strncpy looks fine
stncpy(something, "whatever", 7);
note the string "whatever" is nine characters....or maybe you should use
stncpy(something, "whatever", strlen("whatever") + 1);
DESCRIPTION
The strcpy() function copies the string pointed to by src, including
the terminating null byte ('\0'), to the buffer pointed to by dest.
The strings may not overlap, and the destination string dest must be
large enough to receive the copy.
The strncpy() function is similar, except that at most n bytes of src
are copied. Warning: If there is no null byte among the first n bytes
of src, the string placed in dest will not be null terminated.
(If this even works, which I'll test in a second
You posted this without even showing the ambition to try it first?
Hi,
I want to write a log function but I want to implement in the style of fprintf/sprintf style. ie
fprintf(arg1, template string, template values) write_to_log(template string, some array of ints/double etc to fill the template)
I want to implement this variadic function:
void write_to_log(char template, int nargs, ...) { printf(template, ???); } int main() { write_to_log("client speed: %d\n", 1, 5); }
I am stuck at line 3 where I want to do pass to printf whatever variable array of argument is passed to write_to_log.
What should I pass to printf inside write_to_log?
Besides
a) how to handle a mix of different types ie int / float etc just like printf?
b) how to handle string?Thanks.
shouldn't this:
void write_to_log(char template, int nargs, ...)
be:
void write_to_log(const char *template, int nargs, ...)
Plus here's a good example:
http://www.gnu.org/s/libc/manual/html_node/Variadic-Functions.html
Try googling setvbuf(). This function allows for unbuffered writes..
I understand the inputs can be provided using the args parameters but how to get file handle of the output of the created processes? Also does this work for ssh also as it seems to be different than any other cases involving local programs.
What your asking is probably operating system specific...For Linux/Unix its a matter of forking the process and then replacing one/both of the forks with your new process
#include <unistd.h>
enum PIPES {READ, WRITE};
int main(int argc, char**argv)
{
if (argv[2])
{
int hpipe[2];
pipe(hpipe);
if (fork())
{
close (hpipe[WRITE]);
dup2 (hpipe[READ], 0);
close (hpipe[READ]);
execlp (argv[2],argv[2],NULL);
}
else
{
close (hpipe[READ]);
dup2 (hpipe[WRITE], 1);
close (hpipe[WRITE]);
execlp (argv[1],argv[1],NULL);
}
}
return 0;
}
This is a standard example for Linux. You can't do this in Windows, well at least the fork part..
Here's a little hack that'll work
#include<stdio.h>
#include <stdlib.h>
#include<string.h>
int main()
{
char ch;
char name[20];
printf("enter your name\n");
scanf("%s%c",name, &ch);
printf("enter single value\n");
ch=getchar();
fprintf(stdout, "name->%s, char->%c\n", name, ch);
exit(EXIT_SUCCESS);
}
That said you probably should write your porgam something like below
#include<stdio.h>
#include <stdlib.h>
#include<string.h>
int main()
{
char ch;
char name[20];
printf("enter your name\n");
fgets(name, 19, stdin);
printf("enter single value\n");
ch=getchar();
fprintf(stdout, "name->%s, char->%c\n", name, ch);
exit(EXIT_SUCCESS);
}
Right away you shouldn't use:
char name[20];
scanf("%s",&name);
It should be:
char name[20];
scanf("%s",name);
Wasn't this just posted?
Also main should return a value.
try running this code...you'll be able to see your output which I cropped at 100
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int a, c;
a=3;
c=2;
for (c=2; c<100; c++)
{
for (a=3; a != a%c; a++)
{
printf ("%d \n", a);
if (a > 100) exit(EXIT_SUCCESS);
}
}
system("PAUSE");
return 0;
}
Hi,
In java, we can run a program remotely by doing something like this:
Runtime.exec("ssh machinename programname")
I was wondering whether I can do the same in C using some standard library function call. Also is this possible to get a handle to the remote program's input/output to see its console output or provide input (as done in java)?
Thanks.
I'm going to say no because C's standard library doesn't include that kind of functionality....Do operating system's like Windows, Linux and Mac include C libraries that include that functionality? Yes.
For Linux/Unix you would include the library unistd.h (unix standard) to include the family of functions: execl, execlp, execle, execv, execvp
DESCRIPTION
The exec() family of functions replaces the current process image with
a new process image. The functions described in this manual page are
front-ends for execve(2). (See the manual page for execve(2) for fur‐
ther details about the replacement of the current process image.)
I'm not sure what program was run to get that output but
info binutils
will list all the binary utilities that are available in Linux.
Maybe if you gave us a little more to go on....What are we looking at?
This should really be posted in the assembly section.
>I'm not arguing with you but global variables must be an accepted misconception..
It's well understood terminology, and everyone knows well enough what you mean when you say "global variable", so there's no point in being strictly correct when talking about them. It's like how dynamic arrays aren't really arrays. But everyone knows that when you say "dynamic array", you mean a simulated array with pointers and dynamic memory, so it's a convenient way to say the same thing with fewer words.However, something unconventional like differentiating between "external variables" and "global variables" is an entirely different matter. It's the first time I've heard that particular distinction, so I felt the need to clarify. ;)
It must be a throw back from Linux/Unix assembler
7.54 `.global SYMBOL', `.globl SYMBOL'
======================================
`.global' makes the symbol visible to `ld'. If you define SYMBOL in
your partial program, its value is made available to other partial
programs that are linked with it. Otherwise, SYMBOL takes its
attributes from a symbol of the same name from another file linked into
the same program.
If we look at this simple program and compile it but do not assemble we get
#include <stdio.h>
#include <stdlib.h>
char ch[] = "Hello, World!\n";
int x = 89;
static int y = 90;
int main(int argc, char**argv)
{
fputs(ch, stdout);
fprintf(stdout, "ans x->%d\n", x);
fprintf(stdout, "ans y->%d\n", y);
exit(EXIT_SUCCESS);
}
.file "testfile.c"
.globl ch
.data
.type ch, @object
.size …
>In my case, I obtain errors (undefined reference to `myVar') when I use extern in "global.h."
Are you forgetting the definition? I added a globals.c file that forces an absolute definition for myVar. If you don't have that definition somewhere, the linker won't be able to reference the object.>This may not be 100% but I always though of global
>and external variables as indicators to the linker
Technically there's no such thing as a global variable. What people usually mean by "global" is an object with file scope and external linkage which can be made visible in other scopes using an external declaration.
I'm not arguing with you but global variables must be an accepted misconception..
Try gooling global variables in C
This may not be 100% but I always though of global and external variables as indicators to the linker such that:
global variable is available out side of the file its defined in.
external variable is defined out side of the file its used in.
Hello Gurus,
I understood that pragma pack will avoid unneccessary packing.
#pragma pack(2)
provides the allignment on 2 byte buondary.#pragma pack(2)
provides the allignment on 2 byte buondary.
but the question what i asked was :will the first member always gets the location that is divisible by four.
i am sorry if i could not understand the info provided correctly.
If you leave variable addressing up the compiler then yes, all addresses will be aligned on word size(and I would say your word size is 4 bytes).
If you engage packed structures then the first variable is aligned and the rest are packed.
If you use some custom addresses scheme then addressing is whatever you want it to be.
Note: Variable addressing should be left to the compiler unless you have a specific reason to change it like, hardware programming, systems programming.
Here's an example where you should use a packed structure - to get the base address and limit of the interrupt/global descriptor tables. Here the program 'should' use a packed structure. Note - you could achieve the same thing without packed structures but the code won't be as readable.
#include <stdio.h>
#include <stdlib.h>
struct id
{
unsigned short limit;
void *base;
}__attribute__((packed)) myidtr, mygdtr;
int main(int argc, char**argv)
{
__asm__ __volatile__
(
"sidt myidtr\n\t"
"sgdt mygdtr\n\t"
);
fprintf(stdout, "myidtr.limit->%u\n", myidtr.limit);
fprintf(stdout, "myidtr.base->%p\n", myidtr.base);
fprintf(stdout, "mygdtr.limit->%u\n", mygdtr.limit);
fprintf(stdout, "mygdtr.base->%p\n", mygdtr.base);
exit(EXIT_SUCCESS);
}
I never done a palindrome routine before but I would:
1. take original string and create new string removing all characters like spaces, tabs, punctuation.
2. I would take the new string and check each character with either toupper/tolower
therefore nullifying case.
These are only suggestions because like I said I never create a palindrome routine.
Number one, I have to ask, how strict is your definition of palindrome?
Would you consider this one - Madam, I'm Adam
Where punctuation, case and spaces are ignored.
Please read this:
http://www.daniweb.com/forums/announcement118-2.html
If your looking for the answer without any effort try googling
Also for an exercise could you create an unsigned integer that isn't aligned on word size?
Well kind of...try looking into something like this
int num1 = 6, i = 0, j = 0;
for(i = num1; i >= 0; --i)
{
for (j = i; j >= 0; --j)
{
fputc('*', stdout);
}
fputs("\n", stdout);
}
Memory is aligned on word size. This is done for efficiency reasons, You really should continue exploring memory and how its laid out, its an interesting subject - may I suggest you look into packed structures..
I would use two for loops - one counts down from the number of asterisk and then another that counts up to the number of asterisk.
Not really sure what you want...is it something like this
#include <stdio.h>
#include <stdlib.h>
#define ARR_SIZE 10
int main(int argc, char**argv)
{
int jump = 0, i = 0;
int *intptr = (int*)NULL;
int *origptr = intptr;
intptr = (int*)malloc(ARR_SIZE * sizeof(int));
for (i = 0; i < ARR_SIZE; ++i)
{
intptr[i] = i + 1;
}
fprintf(stdout, "enter jump value 0 - %d-> ", (ARR_SIZE - 1));
fscanf(stdin, "%d", &jump);
intptr += jump;
fprintf(stdout, "ans->%d\n", *intptr);
free(origptr);
origptr = (int*)NULL;
intptr = (int*)NULL;
exit(EXIT_SUCCESS);
}
This is a simple example of passing a char pointer....again I must state both these programs are by no means rigorous...
usage:
./server&
./client 127.0.0.1
enter the first integer-> 12345
enter the second integer-> 895623
enter a string->this is a test string to pass along to the server
client.c
#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <strings.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
void createstring(char **str, char *s)
{
int i = 0;
int len = strlen(s);
*str = (char*)malloc(len * sizeof(char));
for (i = 0; i < len; ++i)
{
(*str)[i] = s[i];
}
(*str)[len] = '\0';
}
struct mystr
{
unsigned int one;
unsigned int two;
char *ch;
};
#define DEFAULT_PROTOCOL 0
#define STRBUF 200
int main(int argc, char**argv)
{
char ch[STRBUF] ;
struct mystr thestr;
int clientfd, len = 0;
struct sockaddr_in servaddr;
if (argc != 2)
{
fputs("usage error - a.out <IPaddress>\n", stderr);
exit(EXIT_FAILURE);
}
if ((clientfd = socket(AF_INET, SOCK_STREAM, DEFAULT_PROTOCOL)) < 0)
{
perror("socket");
exit(EXIT_FAILURE);
}
bzero(&servaddr, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(50000);
if ((inet_pton(AF_INET, argv[1], &servaddr.sin_addr.s_addr)) <= 0)
{
fputs("conversion error!\n", stderr);
exit(EXIT_FAILURE);
}
if ((connect(clientfd, (const struct sockaddr*)&servaddr, sizeof(servaddr))) < 0)
{
perror("connect");
exit(EXIT_FAILURE);
}
fputs("enter the first integer->", stdout);
fscanf(stdin, "%u", &thestr.one);
fputs("enter the second integer->", stdout);
fscanf(stdin, "%u", &thestr.two);
fputs("enter a string->", stdout);
fgetc(stdin);
fgets(ch, 199, stdin);
createstring(&thestr.ch, ch);
len = strlen(thestr.ch);
/*fprintf(stdout, "ans->%u\n", thestr.one);
fprintf(stdout, "ans->%u\n", thestr.two);
fprintf(stdout, "str->%s\n", thestr.ch);
fprintf(stdout, "str->%u\n", len);*/
write(clientfd, (char*)&thestr, (2 * sizeof(unsigned int))); …
Hi
I need help;;Write a program to simulate a demand paging system. The program should implement the FIFO and LRU page replacement algorithms presented in Chapter 10 of the textbook. Your program input should include:
The name of the page replacement algorithm.
Information about the number of physical page frames in the simulated system.
A path name of the file containing a reference string of virtual page numbers.
Your program should apply the reference string on each algorithm and record the number of page faults incurred by each algorithm. The reference string file contains a simple list of integer numbers separated by white space (possibly new line characters). Each integer refers to a virtual page number that is being referenced on that step. If a particular virtual page is not in the physical memory, you must swap it in. If there is not free space in the physical memory to hold the swapped in page, you must select a page to be replaced according to the applied policy. Your program user interface should be kept as simple as possible.
Please read
Just curious, If you run this program what's your outcome
#include <stdlib.h>
#include <stdio.h>
#define ARR_SIZE 10
int main()
{
int i = 0;
unsigned long *myint = NULL;
myint = (unsigned long*)malloc(ARR_SIZE * sizeof(unsigned long));
for (i = 0; i < ARR_SIZE; ++i)
{
fprintf(stdout, "addr->%p\n", (void*)myint++);
}
exit(EXIT_SUCCESS);
}
I got
addr->0x8c7010
addr->0x8c7018
addr->0x8c7020
addr->0x8c7028
addr->0x8c7030
addr->0x8c7038
addr->0x8c7040
addr->0x8c7048
addr->0x8c7050
addr->0x8c7058
on a 64 bit Linux box which makes sense since its an array and the addresses have to be consistent.
Then try this one
#include <stdlib.h>
#include <stdio.h>
#define ARR_SIZE 10
int main()
{
int i = 0;
unsigned long *myint[ARR_SIZE];
for (i = 0; i < ARR_SIZE; ++i)
{
myint[i] = (unsigned long*)malloc(ARR_SIZE * sizeof(unsigned long));
fprintf(stdout, "addr->%p\n", (void*)myint[i]);
}
exit(EXIT_SUCCESS);
}
My output was
addr->0xfe4010
addr->0xfe4070
addr->0xfe40d0
addr->0xfe4130
addr->0xfe4190
addr->0xfe41f0
addr->0xfe4250
addr->0xfe42b0
addr->0xfe4310
addr->0xfe4370
Why the bigger range? It really depends on how the memory manager doles out memory. In the first example it was required that the memory lie within the requirements of a unsigned long array so the memory manager had allocated it that way...the second example isn't so constricted because its an array of unsigned long pointers....
O.K., try a 'quasi' recursion solution
hello folks,
I have an array of integers and I need to search if there's a combination of 2 numbers that resault a defined sum.
No loops or static variable are allowed.
Any suggestions?cheers,
Elad.
You could try recursion.
Here's the example I gave you but expanded to include character arrays...the next step is to change the character arrays to pointers and handle the extra requirements of communicating the pointer size and data.
again I must state both these programs are by no means rigorous...
server.c
#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <strings.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
struct mystr
{
unsigned int one;
unsigned int two;
char ch1[11];
unsigned int three;
unsigned int four;
char ch2[11];
};
#define DEFAULT_PROTOCOL 0
#define ARRSIZE 3
#define MAXLINE 7
int main(int argc, char**argv)
{
int i = 0, n = 0, j = 0;
struct mystr thestr[ARRSIZE];
char *ch = (char*)&thestr;
int listenfd, connfd, val = 1;
struct sockaddr_in servaddr;
signal(SIGCHLD, SIG_IGN);
if ((listenfd = socket(AF_INET, SOCK_STREAM, DEFAULT_PROTOCOL)) < 0)
{
perror("socket");
exit(EXIT_FAILURE);
}
setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
bzero(&servaddr, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(50000);
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
if ((bind(listenfd, (const struct sockaddr*)&servaddr, sizeof(servaddr))) < 0)
{
perror("bind");
exit(EXIT_FAILURE);
}
if ((listen(listenfd, 5)) < 0)
{
perror("listen");
exit(EXIT_FAILURE);
}
for (;;)
{
connfd = accept(listenfd, NULL, NULL);
if (fork())
{
close(connfd);
}
else
{
j = 0;
while ((n = read(connfd, &ch[j], MAXLINE)) > 0)
{
j += n;
}
for (i = 0; i < 3; ++i)
{
fprintf(stdout, "\none->%d, two->%d, word->%s, three->%d, four->%d, word->%s\n",\
thestr[i].one,thestr[i].two, thestr[i].ch1, thestr[i].three, thestr[i].four, \
thestr[i].ch2);
}
exit(EXIT_SUCCESS);
}
}
exit(EXIT_SUCCESS);
}
client.c
#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <strings.h>
#include <unistd.h>
#include <errno.h>
struct mystr …
When you pass a char pointer in a client server application you have to consider a few things
1. how do inform the recipient the size of the char pointer.
2. I have to allocate the memory for the char pointer in the recipient application.
3. copy the data from the copy buffer into the recipient's allocated memory
If your having this many problems with C why don't you write the application in Java?
Well for unsigned int fields is very easy and it doesnt give you segmentation fault errors. Yeah i know im dumb and i should be reading books with very simple examples, but happens that i need to do something with a bit more difficulty. I try to pass structures with just one char * field and that segmentation fault error keeps popping.
I'm running out, try to find help elsewhere. Thanks ;)
Yeah i know im dumb -
No your not dumb but you need to write your programs starting with basic functionality and work up from there.