18,490 Topics

Member Avatar for
Member Avatar for cocojim

Rookie Disclaimer. I am confused about what is the difference between: A: char *p="string"; B: char q[10]="string"; For A: I can do "p++", which gives a pointer points to "t". But I cannot do command like "strcat(p, " test")", for example. For B: I can do "strcat(q, " test")", but …

Member Avatar for WolfPack
0
259
Member Avatar for gpcdon

Hello, I have been asked to use Microsoft SDK 5.1 to enable voice commands in a program. After installing the SDK I am using the Reco sample program. I am using a vocabulary which I have created. Reco recognizes this vocabulary and is working fine. For the program I need …

0
62
Member Avatar for ~s.o.s~

Hello to all coders out there. I have a doubt regarding the format "long double" which is producing wierd results when used in the case of a factorial program. When "long double" used with C lang. produces the output input = 3 factorial = -2.000000 while when used with C++ …

Member Avatar for WolfPack
0
281
Member Avatar for Nedals

This is a snippet from a larger block of code. The print statements are included for testing. Within 'main', if I ouput the 'cell_ptr' or 'params' pointers, it correctly returns pointer values but if I try to output an element from the params array, I get an '...illegal operation...' message. …

Member Avatar for Nedals
0
126
Member Avatar for brale

Is there a way to get adress of beginnig of my program in operative memory while it executing?

Member Avatar for brale
0
221
Member Avatar for winbatch

Hi, I've inherited some code in C that acts as a server and receives requests over a socket. That is all working fine. I wanted to make a very small change to the server code to print out the hostname of the client connection. However, I'm always getting 0.0.0.0 as …

Member Avatar for kris.c
0
188
Member Avatar for server_crash

I have the following simple piece of code: [code] double new_amount; printf("Enter an amount: "); scanf ("%d", &new_amount); [/code] For some reason, it always give me zero as the new_amount no matter what I input. What exactly am I doing wrong? Also, is there a way I can do a …

Member Avatar for WolfPack
0
921
Member Avatar for nammi_aqua

I am finding difficulty in writing delete function for binary search trees. It wud be great if someone cud send me the code in C language.

Member Avatar for Dave Sinkula
0
59
Member Avatar for kris.c

Hi all, I wish to write the contents of a large char array into a file. I open the file for writing and say, fp is the pointer to the file. and I write : fprintf(fp,"%s",buff); Does fprintf write the whole array into the file or is there any inbuilt …

Member Avatar for Dave Sinkula
0
149
Member Avatar for ds_matrix

[code]///Program for Select Sort //Name: Sharan Shanmugaratnam //Date: June 6th, 2006 //Constants #include <stdio.h> #include <ctype.h> #include <string.h> #include <time.h> #define SIZE 1000 int main (void){ char x[1000][1000], y[1000][1000]; int size; char a[0][1000]; int sorting=0; FILE*file; //Opens the file that contains the 1000 words. file = fopen("words1.txt","r"); //Reads the file …

Member Avatar for Rashakil Fol
0
173
Member Avatar for Acidburn
Member Avatar for Member #46692
0
53
Member Avatar for brale

J need function that calculate formula in infix notation. For exempele function that takes string as argument and return an float as value of that formula. J make function that calculate postfix formula but it is not help me to solve problem.

Member Avatar for WolfPack
0
202
Member Avatar for ShawnCplus

I am going to college after this summer for programming and applications development. I have a little knowledge of C++ and very little C. I was wondering if anyone had some suggestions to some exercises projects that would give me a head start if you will, before I get to …

Member Avatar for Rashakil Fol
0
304
Member Avatar for JC_McGeekster

Hello, These past few months I have been working with the C language. Before that, I was writing console applications with C++. I eventually got to the point where I couldn't seem to do anything more with C++, so I decided to use C as I know it is better …

Member Avatar for JC_McGeekster
0
286
Member Avatar for YoTaMiX

Hello to you all , I am Trying to Implement Code for Void** Array which will Store Strings in a QUEUE system . I can see the Strings in the Queue . I am sure i dis the Casting OK, But i need a fresh pair of eyes. Also is …

Member Avatar for YoTaMiX
0
172
Member Avatar for molayos

I am using libcurl ls -l lib* libcurl.a libcurl.la -> ../libcurl.la libcurl.lai libcurl.so -> libcurl.so.3.0.0 libcurl.so.3 -> libcurl.so.3.0.0 libcurl.so.3.0.0 libcurl3.so -> libcurl.so.3 So we have link for libcurl.so and libcur.so.3 When I complile the code and link it how do I link the [B]libcurl.so.3 (with .3 at the end)[/B]? [B]cc …

Member Avatar for Member #46692
0
185
Member Avatar for Mamata

Hi, I'm not a beginner in C...I'm more used to C/C++ programming through Microsoft visual C++ rather than Simple compilers such as TurboC. Now I've loaded TurboC in my home PC so that my brothers get started with C programming... But we are not able to compile any program... Error: …

Member Avatar for WaltP
0
176
Member Avatar for CStallion

I just need to know how to count the entries of an array like this one: [code] string array[] = {"entry", "entry", "entry", ... , "entry"}; [/code] Thanks!

Member Avatar for Member #46692
0
159
Member Avatar for bzburr

Hi everyone have been asked to maintain a Borland Builder 6 application - though im more used to another environment have been finding Builder quite fun as a change. I have run into a problem - in the app there is a form which has an owerdrawn TListbox (items added …

0
87
Member Avatar for cocojim

I was trying to implement "strcat" myself, however, I found that the following commands simply won't work: "..... char *p; p="string"; *(p+2)=a; " I was thinking that this will change "p" to "staing". But no. It compilies fine, but when I tried to print out p, i got error message: …

Member Avatar for cocojim
0
255
Member Avatar for kris.c

hi all, I am required to generate an array having 100 random numbers, where there is absolutely no repetition and the case where the ith element of the array is the number " i " itself is not allowed .. I found some ideas where we could generate pseudo random …

Member Avatar for Narue
0
302
Member Avatar for ghadahelal

hallo i need 2 deal with each digit after the floating point. ex . 12.5678 i need 2 compare the 12.5 with another number and then the 12.56 and then 12.567 and so on till 4 digits is there is a function that takes the int number and one number …

Member Avatar for jetru
0
280
Member Avatar for molayos

How do I pass a file to post instead of message The url i am posting is IP:PORT/app/server/recieve. How do I pass /app/server/recieve in the following program? struct sockaddr_in { (short int sin_family; unsigned short int sin_port; struct in_addr sin_addr; unsigned char sin_zero[8]; } struct sockaddr_in their addr; their_addr.sin_family=AF_INET; their_addr.sin_prot …

Member Avatar for kris.c
0
107
Member Avatar for gampalu

I want to open a file and count the number of strings in the first line. Assuming that each string is delimited by spaces. I tried to do some code but yet not successful, can anyone help? [CODE] int main(int argc, char* argv[]) { int count = 0; FILE *stream; …

Member Avatar for Member #46692
0
550
Member Avatar for waseem3000

<<mod edit: threads merged>> I need to write a recursion function recursiveMinimum that takes an integer array and the array size as arguments and returns the element with the smallest value in the array. The function should stop processing and return control to the caller if it receives a one-element …

Member Avatar for Lerner
0
287
Member Avatar for kris.c

I have done programs that print themselves on execution,but is it possible for a c program to execute itself or another c program whose path is specified??

Member Avatar for kris.c
0
203
Member Avatar for molayos

No header file to do https in "C" Anybody knows good C based utility (not C++) that allows me to do post xml documetns via https to the server Need desperate help

Member Avatar for Salem
0
117
Member Avatar for kris.c

hi all, Suppose, I have a string stored in a character array. I want this string to be stored in a file. If I do fopen and use the write mode ,the contents of this file will be junk.. How can I store the string as it is inside the …

Member Avatar for Ancient Dragon
0
116
Member Avatar for Pacer

Hi,everybody.Following is an simple C programm which want to display the content of a file with corresponding hex.If one letter is a undisplayed then replace it with '.' . info and code: info: [root@localhost guai]# gcc disp.c -o disp.exe disp.c:29:9: empty character constant disp.c: In function `main': disp.c:47: wrong type …

Member Avatar for Pacer
0
214
Member Avatar for cas777

HI, I AM CAS ORJIOKE FROM NIGERIA. I'M A FINAL YEAR STUDENT IN ELECTRICAL AND ELECTRONICS ENGINEERING. I DESIRE KNOWLEDGE ALOT. IF THERE IS SOMEONE TO ME GAIN THE KNOWLEDGE IN C AND C++, I'LL BE VERY GRATEFUL. MY E-MAIL IS ;[email protected].

Member Avatar for Erich K
0
196
Member Avatar for kris.c

hello, I am supposed to transfer a .c file from my machine to a remote machine without "telnetting" ..I have managed to do so by using the basic socket programming functions...I must find out a way to make the remote machine to automatically execute the .c file on receiving it …

Member Avatar for kris.c
0
136
Member Avatar for molayos

We have True 64 5.1 version of Unix that has c compiler. Also we run informix-4gl. Informix-4gl cannot do http post. But it can call "C" programs. So I need to do http post through "C". Since I am not very good at "C", I couldn't change and compile uday …

Member Avatar for molayos
0
297
Member Avatar for codergem

Helo friends!! I m having problems in understanding that how every node is added at last.Could anyone explain me this in much better manner. Well here it is.... we use a local "reference pointer" which always points to the last pointer in the list instead of to the last node. …

Member Avatar for Lerner
0
216
Member Avatar for Vada

I really need help in computer projects can any one suggest me where to get computer projects please send in my mail .In case you are having one please attach it and send it in my mail. Hey it is dam URGENT my school is going to open within two …

Member Avatar for server_crash
0
229
Member Avatar for SourceCrusade

Hi all, I'm new to this forum but very old to C & C++ :eek: . My particular areas of interest are artificial intelligence and computer aided software engineering. Regards, Bruce A.

Member Avatar for Dani
0
51
Member Avatar for Buggaya

I'm begginer in using c ( platform of linux) the problem is that idon't know name of function that ineed First Iwant to make simple applications to be able to go through it step by step. Can any one know functions used to accomplish that simple program =>Run/stop a specific …

Member Avatar for Dave Sinkula
0
113
Member Avatar for AhmedHan

Recently I installed Visual Studio 2005 .NET on my computer. I wrote a Win32 program. But my program doesn't run on PCs that doesn't have Framework 2 installed on. Is there any settings for VS 2005 .NET to make my code run on all PCs? Or what DLL file should …

Member Avatar for WolfPack
0
174
Member Avatar for tlly

I've got a 2 tricky questions for u. Can anyone write: 1). A "Hello World" program in 'C' without using any semicolon. 2). A 'C' program without using any loop (if, for, while,etc...) to print numbers. A friend gave me those questions but up till now i have not been …

Member Avatar for Dave Sinkula
0
237
Member Avatar for fawadhq

i want to make a reservation system for my DataStructures Project. THE main requirement is that the complete data file has to be loaded in the memory and then any processing ( entry, deletion, sorting or searching ) has to be performed in the memory ? where am i going …

Member Avatar for hammerhead
0
147
Member Avatar for static

HI , i have some errors about linked list,when i made print it only shows characeters like 'ô¼'... plz help; :lol: // lets assume wordCount is 10 and vayArray is {"lower",upper}; :cool: Thank you very much Here is code:[code] struct for_char_5 { char vh5[80]; for_char_5 *next; }; for_char_5 *p, *start, …

Member Avatar for Ancient Dragon
0
146
Member Avatar for codergem

Helo !!! I was trying to implement linked list in which the data field is Generic... the structure details are.. [code]typedef struct node { void *data; struct node *next; }gnode; [/code] Now to add a node into it, and i have written this function. [code]void insert(gnode **head,void *data,unsigned int size) …

Member Avatar for codergem
0
158
Member Avatar for luckycharms3657

i have been working on this for some time now and i get an error message that says "Could not find a match for 'vector<int>::vector(const int, const int, const int)' " heres my code. [code] #include<u:\C Plus\LVP\gui_top.h> #include<u:\C Plus\LVP\vector.h> //-------------------------------------------------------------------------------- class ButtonClass { public: ButtonClass(String Text, int X1,int Y1, int …

Member Avatar for Salem
0
109
Member Avatar for Phaelax

I'm doing an english paper, an internal proposal memo. I chose a fake company and their problem is use of remote monitoring software which bogs down a system beyond use when its active due to the software doing complete screen dumps for the monitoring. My proposed solution is to rewrite …

Member Avatar for Salem
0
156
Member Avatar for dude543

This is/was an interview question I got two weeks ago. Find where the loop begins in simple linked list. I hope this figure will help understand what I mean : [code] [LEFT][1] ->[2] ->[3] ->[4] ->[5] ^ | | U [10] [6] ^ | | U [9]<- [8]<- [7][/LEFT] [/code] …

Member Avatar for dude543
0
167
Member Avatar for lilynadia

I need help... I don't know how to insert data [continuous numbers] from a text file (.txt) into a linked list?? I have been searching for some tutorial abt it but i didn't found any of it. Please help me!!!

Member Avatar for WolfPack
0
41
Member Avatar for yuzhang

Hi all: I got some questions on the following terminologies: Stackframe and heap. Can anybody give me some explainations with simple examples? Thanks

Member Avatar for LieAfterLie
0
125
Member Avatar for gampalu

Hi! I built this class, however when I executed my program the memory run out quickly, because I wasn't making any "deletes", so I added the delete in the destructor, but It crashes there... what's wrong? [CODE]class CMatrix { public: void Identity(); void SetMaxColRow(int nRow, int nCol); void SetElement(int nRow, …

Member Avatar for Salem
0
372
Member Avatar for yuzhang

Hi people: Here is a very basic question, but it has been bugging the living hell out of me. I am using Visual Studio 2005 and progamming in C. The whole program's skeleton was given to me, and NOT to be altered. There are several header files in the "header" …

Member Avatar for LieAfterLie
0
128
Member Avatar for YoTaMiX

Hello , I wish to create a User-Defined array (1=float , 2=int) and to ALLOC the array properly. I defined void* ARR in main function and is a SWITCH (choise) i will make the desired array. why doesnt it work? Code is attached . thanks :-)

Member Avatar for Ancient Dragon
0
199
Member Avatar for nanodano

I've been looking for information on threading, and I found information on POSIX pthreads. Apparently, Visual Studio 2005 does not have [INLINECODE]pthreads.h[/INLINECODE] in their library. I did a search on the computer, and I found pthreadlocale.obj in the LIB directory. Does this object file have anything to do with pthread.h? …

0
74

The End.