15,551 Topics

Member Avatar for
Member Avatar for apbarratt

Hi guys, I would like to add a char to the end of a char* So imagine the following: char* test = "ABC" I want to add D to the end of it to get test == "ABCD" for the sake of argument, I can not use strcat as I …

Member Avatar for apbarratt
0
184
Member Avatar for berwick53

Hi, Im trying to make a caesar cipher, but a windows error comes up when running. Where have I gone wrong?? Sam [CODE]///////////////////////////////////////////////// /// /// /// NAME: SAM BERWICK /// /// DATE: 18/11/2010 /// /// PROJECT: CAESAR CIPHER /// /// /// //////////////////////////////////////////////// #include <stdio.h> /// Stand In/Output #include <string.h> /// …

Member Avatar for NP-complete
0
82
Member Avatar for libathos

I want to make a button in a root window.My question is should i draw it or shoud i make a new window in my root window?

0
97
Member Avatar for NichtSoGut

So basically it involves sodding scanf(). [CODE]int NumericalAnswer; int score = 0; main() { printf("Question 1: What's 4 x 3?\n"); scanf("%d\n", &NumericalAnswer); if (NumericalAnswer == 12){ printf("You got it right!"); score += 1; } }[/CODE] Output [ICODE]Question 1: What's 4 x 3? 12 9 You got it right![/ICODE] As you …

Member Avatar for Narue
0
112
Member Avatar for florisvd

Hello, I´ve got a question about multiplexing 7 segment displays. I already have working 1 7 segment display. How can I control more 7 segment displays? Now only the 3th display can be controlled. This is the code I've made: #include <avr/io.h> #include <util/delay.h> #define F_CPU void delay_ms(uint16_t); void digit …

0
63
Member Avatar for atramposch

I wrote a short piece of code to give me a .dat file for use in another program. But i cant figure out what is wrong. I run on a mac, and use Xcode. [CODE]#include <stdio.h> #define ARRAYSIZE 1500 #define BINDATA "file://localhost/Users/Hub/Desktop/231A4binData.dat" int main (void) { int i; double dblData[ARRAYSIZE]; …

Member Avatar for Ancient Dragon
0
167
Member Avatar for mpassaglia
Member Avatar for Perry31

Hi, Can anyone explain in detail what is the difference between int *a and int* a? Is there any difference between them?

Member Avatar for Ancient Dragon
0
83
Member Avatar for dduleep
Member Avatar for Jmknight
0
103
Member Avatar for foobar8

Hello, I have a program that is like a ftp server - it sends and receives files over unix sockets. It works fine when I transfer text files, but as soon as I want to receive binary files, it's not working properly. Files are transferred correctly, I can verify that …

Member Avatar for mrropi
0
939
Member Avatar for berwick53

Hi what methods of encryption could I use to encrypt a text document. It must use C and not C++. Cheers Sam

Member Avatar for Adak
0
115
Member Avatar for atramposch

i know there is probably a trick for this in C that i do not know, but i attempted to write my own function for finding the mode of an array of data (As large as 1500 doubles). Heres my crack at it. [CODE]void mode (double * array, int numItems) …

Member Avatar for atramposch
0
99
Member Avatar for praneeth_gunda
Member Avatar for halil.burak

i need help with the 5th case in the submenu! Several 2-dimensional geometric shapes, area, and a program for environmental accounts are required to be made. To do this, first run the program in a main menu displayed on the screen as follows: MAIN MENU 1. Area Calculation 2. Perimeter …

0
105
Member Avatar for florisvd

Hello, I´ve got a question about multiplexing 7 segment displays. I already have working 1 7 segment display. How can I control more 7 segment displays? Now only the 3th display can be controlled. This is the code I've made: #include <avr/io.h> #include <util/delay.h> #define F_CPU void delay_ms(uint16_t); void digit …

0
69
Member Avatar for onus

On this link [url]http://lxr.ncu.cc/source/kernel/timer.c#094[/url] a return type is defined [CODE] return ((unsigned int)(unsigned long)base & TBASE_DEFERRABLE_FLAG); [/CODE] What is the above function returning.I am not clear with definition of what is being returned in the above code.

Member Avatar for onus
0
162
Member Avatar for vinitmittal2008

Write a 'C' Function to combine two singly connected linked lists in the following manner. Suppose one list is "L" which can be given by L=(l0,l1,.....,lm) and the other list is "M" where "M" can be expressed as M=(m0,m1,......,mn) where each li,mi represents one node in the respective lists. For …

Member Avatar for vinitmittal2008
0
170
Member Avatar for george_82

Hi All, Can somebody explain what is the difference between (char*) and (char**). I am just looking for an explanation of in byte level. Also please refer any documents related to this. Thanks

Member Avatar for sree_ec
0
86
Member Avatar for maggie_fairy

im a first year engg student. i need 2 make a report on cryptography and i need the source code in C for caeser cipher. as it so happens im not very good at c programming... please help can u tell me wats wrong wid this program? #include <stdio.h> void …

Member Avatar for darkbreaker
0
309
Member Avatar for Futchy

so i just started this programming class in school today, im having alot of trouble, i dont want everyone to do the work for me, but i would love for you guys to tell me what needs to be done, i know this is alot to ask so if anyone …

Member Avatar for darkbreaker
0
400
Member Avatar for yuri1969

Hi, I would like to make an threaded app which would use pthreads. I made a linked list and I put references to running threads here. I know that operations of adding a new thread reference to the list and removing a thread reference from the list after the thread …

Member Avatar for yuri1969
0
177
Member Avatar for slatk3y

Hello, I want to redirect stdin and stdout of "cat" program to my program. For example if I type "cat" in terminal, and enter input and press enter it outputs the same string I entered. In my c program I am trying to use pipes and dup. I cannot figure …

Member Avatar for slatk3y
0
244
Member Avatar for MarounMaroun

Hello all, I have this code: [code=c] void SetMatrixRange(MyMatrix * matrix, int xfirst, int xlast, int yfirst, int ylast, int zfirst, int zlast, int value) { int i,j,k; for(i=xfirst;i<=xlast;i++) for(j=yfirst;j<=ylast;j++) for(k=zfirst;k<=zlast;k++) matrix->m[(i*ylast*zlast)+(j*zlast)+k]=value; } [/code] I allocated the matrix like this: [code=c] MyMatrix * CreateMyMatrix(int x, int y, int z) { …

0
64
Member Avatar for alviss_88

Hi! i trying to take the same value from 2 arrays and then count how many time of it. However, when i compile, it run ok. but it did not print out the value of coutting. I did not know why, i had tried several times to fixing. please help …

Member Avatar for Perry31
0
261
Member Avatar for medamineb

hi everyone, i'm trying to do a program in c, GCC UNIX and i have this error: warning: passing argument 2 of `write` makes pointer from integer without a cast i try to use TUBE, communication between process and i use `write(fd[1],2,1);` but it gives this error please i nead …

Member Avatar for medamineb
0
1K
Member Avatar for AspiringGuru

I absolutely hate hate hate hate HATE to be doing this, because I've figured out every other program I've done relatively alone with my C Book. I'm writing a program that declares an array of structs, each with a name and age field. The data is read from a file …

Member Avatar for sree_ec
0
92
Member Avatar for wvuengr33

The program I am writing is supposed to read in a txt file and then align the txt depending on the number of characters per line that the user has specified. Since there aren't any limitations to the length of the text it has to be represented using a dynamic …

Member Avatar for griswolf
0
334
Member Avatar for Hi-Tone

Dear all, Im trying to do a matrix multiplication with complex number. I have 2 structures: [code=c] /* Structures */ typedef struct complex { // Complex structure = real and imaginary part. double re; double im; } Complex; typedef struct complex_matrix { int rows; int cols; Complex **mat; } Complex_Matrix; …

0
29
Member Avatar for bufospro

Hi all, I am trying to read a file in C. The format of file is something like that : ----------------------------- <From: [email]sender@hotmail.com[/email]> Hellooooooooo. </from> <From: [email]george@gmail.com[/email]> What am I doing? nOwwwwwwwwwwwwww </from> ---------------------------- I would like to read the file and extract some info like number of emails , …

Member Avatar for Ancient Dragon
0
79
Member Avatar for I<3soccer

Hello, I'm working on an inventory program in c and having a lot of trouble with it. I've compared my code to several examples in the book and it seems right but I'm having these problems: 1. When I try to list the tools, the program ignores the command and …

0
50

The End.