1,494 Posted Topics
Re: This doesn't make any sense to me...Could you elaborate | |
Re: 1. why do you do this "After filling out this info, I am using memmove() to put all of the data into a char array and use send() to send the information. All of the sent data (except sendString) is converted to network byte ordering." just cast the structure to … | |
Re: Not sure what your asking? Do you mean you want to create: 1. a thread which exists in the current process 2. a new process which exists independently | |
Re: choice is defined as "" maybe you should try defining it as an array of characters. Something like [CODE] choice: db " " [/CODE] | |
| |
Re: [QUOTE=Gaiety;1004560]This Question is not programming related but rather important for all compiler related programming languages especially the Language C. what is portabily? since my graduation i have been taught C is not 100 % portable language. but i dint get any satisfactory answers for,not 100 % portable? where its lagging … | |
Re: Lets see what you have so far | |
Re: [QUOTE=chrisname;1001774]I'm actually writing this code as inline ASM but I feel it is more relevant to ASM than it is to C... Basically all I want to do for now is print the alphabet. However I'm having some trouble getting used to AT&T syntax (I would rather learn it than … | |
Re: That's because your writing the binary/hex value of the integer and not its ascii text representation... The best way to read and write a structure is to write the structure all at once i.e. [CODE] struct person { }; struct person Person; write(fd, (char*)&person, sizeof(struct person)); read(fd, (char*)&person), sizeof(struct person)); … | |
Re: Looks like you mixing i386 and x86_64 code according to you error message "ld: warning: i386 architecture of input file `chglobals.o' is incompatible with i386:x86-64 output" Here's a simple makefile to create a shared object and use a shared object...Hope it helps [CODE] test: getsetx.so test.o gcc test.o -o test … | |
Hi everyone, I recently installed Slackware 13/x86_64 on one of my boxes and now I'm having troubles with Python code that uses threading and Tkinter. This problem never existed on other Linux distro's, it just appeared with Slackware. The box in question Acer Athlon x86_64 single core used to run … | |
Re: Well Linux has a few - Code::Blocks, Gedit, Kwrite, KDevelope, Gvim and so on. Myself I'm fond of Vim/GVim | |
Re: [QUOTE=ov3rcl0ck;1001094]So when I take an argument off the stack it seems that is in the form of a string, is there a way i can convert it to a integer so i can "cmp" it with another argument which i also wish to convert to an int? I am a … | |
| |
Re: If your going that route I would check the sizeof(argc) just to see what your dealing with, .i.e is it an unsigned char, unsigned short or whatever Just to see what size of variables are accepted | |
Re: This works..maybe you can figure out why [CODE] #include<stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include<unistd.h> #include<string.h> struct Student { char name[21]; char id[11]; char DOB[9]; char gender[2]; char status[2]; }; struct Student myArr[5];//An array of Struct Student int main() { int x, y, z; char dumb[1]; char newline[2] = … | |
Re: Why do you insist on redefining functions...Try this [CODE] #include <stdio.h> void memseta(void *dest,int val,int cnt) { while(cnt--) { *((char *)dest++) = (char)val; } } int main() { char arr[]={1,2,3,4,0}; memseta(arr,103,4); printf("%s\n",arr); return 0; } [/CODE] | |
![]() | Re: You really should post this on the networking section ![]() |
Re: Why don't you def your function like [CODE] def second(s): str = string.split(s) return str [/CODE] then you can print it like print str(second(string)) | |
Re: Dumb question - do the character pointers in this structure receive memory references or do you expect them to be created by the message queue in the receive funtion? [CODE] struct test { int a; char *b; char *c; }; [/CODE] | |
Re: [QUOTE=ov3rcl0ck;998781]I'm extremely new to assembly and was wondering if there is a speed difference between 16, 32, and 64bit registers.[/QUOTE] Not sure what you mean by faster... 64 bit register/CPU's are faster yes because they can transfer more data plus the CPU has twice as many general registers so a … | |
Re: I would check the way your accessing your list xylist[0][1] is the way I do it Or is your way the new Python 3.1.1 way of doing things | |
Re: When I create my own string length function I use [CODE] int mystrlen(char *s) { int i = 0; while (*s++) ++i; return i; } [/CODE] Try this function Also by gcc do you mean Linux? | |
Re: Whenever I've worked with linked lists they have always had a head node, internal node and a tail node. The job of the head node is to point to the first node which is the the tail node initially. The job of the tail node is to signal the end … | |
Re: First random by function is not random...no matter what they call the function it is predictable... Second you really should read up on this field "encryption", its big and diverse I doubt you came up with a new idea.. I really hate to busting bubbles but the truth is encryption … | |
Re: I have no idea why this is happening but you may get better results if you gave us the name and website of the Python app | |
| |
Re: Depends what you mean by remove..Do you mean replace with spaces or do you mean take the character out and shift everything over one space.... | |
Re: Why don't you use the Python interpreter...It does a great job of parsing | |
Re: It says right in the attachment "use the second method in the textbook to compute the integral" From the brief description it just looks like the summing of areas under the curve where each area calculation is handled by its own thread... This is my interpretation of it but I … | |
Re: If this is C++ code/compiler then you should be able to instruct the compiler to stop before assembling, so the output should be in the form of a assembler code file.. | |
Re: If your using old Python code with Python 3.x.x then you may have to port the programs because Python 3.x.x doesn't guarantee backwards compatibility | |
Re: Do you mean all combinations that are words or do you mean all combinations of the letters regardless if they form a correct word? | |
Re: Number one your posting title is misleading "Problem with fork system call". The system call is working just the way its supposed to. I kind of see what your trying to do here, copy a file and display its progress at the same time...this to me sounds like a problem … | |
Re: [QUOTE=erckle;995210]Sorry guys...this is probably really trivial but i'm new to Python. How do you remove the first digit from a five digit number called x and then add this new number to the original x. I need to be able to remove any of the digits and add the new … ![]() | |
Re: I am using the file ex3test.c to run the following program, but the UNIX gives the errors: [38] $ gcc -o ex3test ex3test.c Do you mean when you compile ex3text.c it gives you errors | |
Re: I really don't see the purpose of the quotes [ICODE] int assignment1[30]; " "; [/ICODE] Won't this achieve the same thing [ICODE] int assignment1[30]; [/ICODE] Plus this line [ICODE] char totalPoints = "assignment1; + assignment2; + assignment3; + assignment4; + assignment;5 + assignment6;"; [/ICODE] should be [ICODE] char totalPoints[] = … | |
Re: Your array maybe too big. Try decreasing the size of the array and see if the seg fault goes away...G | |
Re: You could return the address to the array of structures | |
Re: I only read this quickly and I have a hard time understanding why this is only five bytes [ICODE] char *msg = (char *) malloc (5); [/ICODE] Since copy "Hello, " to it then you strcat "Fred" to it | |
Re: Disregarding a return value is harmless. Well with that said I should mention that the return value is lost but if its deemed insignificant then no harm done | |
Re: try [ICODE] x ==1 or x == 2 [/ICODE] your version is always true [ICODE] x ==1 or 2 [/ICODE] since 2 is not 0 so anything or'd with a true value is true | |
| |
Re: Not allowed to answer homework questions without you showing some effort... | |
Re: If your doing a straight rev of bytes why are you stripping the first bit [ICODE] x = (x & 0x7FFFFFFF ); [/ICODE] |
The End.