15,551 Topics

Member Avatar for
Member Avatar for ananthxp

hai i am doing a small project. can write program that listen to usb port? if suppose an device is connected to usb port a message should come describing the nature of the device connected? is this possible in c? if not can you suggest me how to do this? …

Member Avatar for Ancient Dragon
0
97
Member Avatar for amishosh

Consider the following code: [code] [COLOR=green]#include[/COLOR][COLOR=green]<stdio.h>[/COLOR] [COLOR=green]#define[/COLOR][COLOR=green] SET_BIT(buf,n,val)buf[n]=val[/COLOR] [COLOR=green]int[/COLOR][COLOR=green] main()[/COLOR] { [COLOR=green]char[/COLOR] ch=[COLOR=green]'D'[/COLOR]; [COLOR=green]char[/COLOR] *name=[COLOR=green]"Yankee Duddle"[/COLOR]; [COLOR=green]int[/COLOR] i=5; SET_BIT(name,i,ch); printf([COLOR=green]"%s"[/COLOR],name); } [/code] When compiling with Borland C it worked fine. However when I tried cimpiling it with VS 2005 I got the following error: "Unhandled exception at 0x00413529 in Learning …

Member Avatar for Salem
0
188
Member Avatar for php111

hi, I am a beginner and haven't decided to learn how to program in C or Python. Is there any free tutorials in C that is very good? I can run searches in google but i am not sure what tutorials are good or not good. Another question, later in …

Member Avatar for Ancient Dragon
0
120
Member Avatar for sainiricha

Can anyone help me out to start graphics in C!!! i cant understand what books i need to reffer n which online tutorials i should take!!

Member Avatar for TkTkorrovi
0
105
Member Avatar for Elfshadow

My friend who is a VB6 programmer is doing a benchmark against C and the VB is running faster than the C but we know this isn't a reliable benchmark Could you look at our benchmarks and tell us any thing that might be causing this. MINGW [code] #include <stdio.h> …

Member Avatar for Ancient Dragon
0
268
Member Avatar for tejeshv

Hi Could anyone help me out with the following programs. 1. 'C' code for RS232 null modem connection(pc2pc) using WIN32. Also please let me know how to test on the second PC after transferring data from the first PC. [details of connection: DB9 connector at both the ends] 2. WINSOCK …

Member Avatar for Ancient Dragon
0
146
Member Avatar for amishosh

Hi! I cannot access my "Debug Windows" in VS 6. All the windows are grayed out and I cannot select them. What do I need to define to be able to access them? Thanks

Member Avatar for iamthwee
0
71
Member Avatar for amishosh

Hi! I'm looking for a tutorial to explain handles and messages in C. I tried searching google for a while with no real success. Maybe I'm using the wrong keywords... Thanks.

Member Avatar for Ancient Dragon
0
247
Member Avatar for NycNessyness

Hello guys, I'm currently having a problem with converting uppercase to lowercase. For example in my code below when a user enters in the class number I'm trying to let them be able to type it in both uppercase and lowercase. Like instead of only being able to type ABC101, …

Member Avatar for Aia
0
457
Member Avatar for b_naren

hi everyone, i would like to do a project in c where i can control hardware devices using c programming. where can i get the material(how to start n what are the prerequisites).plz help me

Member Avatar for TkTkorrovi
0
86
Member Avatar for hus2020

hi...i would be very greatful if someone could help me in solving this problem. i am very new to c language and only familiar to "printf" and "scanf". Problem: [CODE]Write a program that calculates the wages of an employee for the month.(Input from user must include YEAR,MONTH,TIME IN & TIME …

Member Avatar for Aia
0
78
Member Avatar for mohammadalipak

After using [INLINECODE]FILE *pFile[/INLINECODE] for file I/O (all the way from [INLINECODE]fopen(pFile, ...)[/INLINECODE] to [INLINECODE]fclose(pFile)[/INLINECODE]), my [INLINECODE]pFile[/INLINECODE] pointer still points to [INLINECODE]0x7803a710[/INLINECODE]. So I figured I better free it. However, when I try [INLINECODE]free(pFile)[/INLINECODE], it pauses execution (while debugging - though no breakpoint is set). When I hit F5 again …

Member Avatar for TkTkorrovi
0
1K
Member Avatar for ssharish2005

[code] #include <stdio.h> void printarray(const int arr[][3]); int main() { int arr[][3] = {{1,2,3},{4,5,6}}; printarray(arr); getchar(); return 0; } void printarray(const int arr[][3]) { int i,j; for(i=0;i<2;i++) { for(j=0;j<3;j++) printf("%d\t", arr[i][j]); printf("\n"); } } [/code] This above code tends to give me a warning. [code] 9 D:\cprogramming\arr1.c [Warning] passing argument …

Member Avatar for Hamrick
0
104
Member Avatar for asilter

i have a char array of 4 elements : [code] 00000000 00000000 00000010 00000111 [/code] how can i assign these bytes to 4 byte integer (this means 519), could you please give a modular code sample? thanx.

Member Avatar for ashishtrivedi
0
3K
Member Avatar for johnray31

HI ALL, i have written some code of line as [code] typedef struct _nodeList { unsigned int pointCode; struct NodeList *next; }NodeList; typedef unsigned int PointCode ; int right_configuration(NodeList *head,PointCode x, PointCode y) { NodeList *node1; NodeList *node = head; int k =0; unsigned int NodePoint[100]; node1 = (NodeList *)malloc(sizeof(NodeList)); …

Member Avatar for johnray31
0
97
Member Avatar for amishosh

Hi! Is there a way that I can "Build" a single source file? Wihout creating a project? I want to be able to open a *.c file in Visual Studio and simply Build it with out having to choose a project. I know it's a whole different world but in …

Member Avatar for Tight_Coder_Ex
0
77
Member Avatar for naserca

Hello, I want to use C for computer oriented numeric methods (i.e. evaluating Numerical values of mathmatical functions and the like). Could some body give some reference stuff (either online or books)?-- could be algorithms and/or programs/codes. Regards, Naser

Member Avatar for iamthwee
0
92
Member Avatar for NycNessyness

I'm currently having a problem with having where it says DailyChild on my code to go up when the user adds a number. For example if they type 1 it should say 1.50. If they enter 2, it should say 3.00. But no matter what I do, it keeps printing …

Member Avatar for NycNessyness
0
876
Member Avatar for tu_m.aimes

Is there a delay function for C? I'm using usleep, but I just found that somewhere on the net and if I get asked about it, I won't be able to explain or even name which library I'm calling it from. Is there a delay function in time.h? If so, …

Member Avatar for ashishtrivedi
0
205
Member Avatar for asilter

how do i assign -let's say number 12000- to 3-byte stream? could u plz give a little code example? thanx.

Member Avatar for ssharish2005
0
138
Member Avatar for chelo77

I'm having problems here with this function i'm making, i need to make function that will write to a text file. This function has to ask the user for the file name and check if it exists. If this is all good then it will write the string in the …

Member Avatar for Aia
0
206
Member Avatar for nanodano

When programming with pthreads, you pass the thread a function to run when you create it. When this function is done, is the thread cleaned up automatically? Is it necessary to put [inlinecode]pthread_join()[/inlinecode] in the calling function somewhere? Is [inlinecode]pthread_join[/inlinecode] only useful when you want to [I]wait [/I]for a thread …

Member Avatar for mcldev
0
205
Member Avatar for grii_19

[code=c] # include<stdio.h> # include<conio.h> void main() { float square(); float a,b; printf("\nenter any number"); scanf("%f",&a); b=square(a); printf("\nSquare of %f is %f",a,b); } float square ( float x) { float y ; y=x*x; return(y); } [/code] when i run this i get an error ::---- "" type mismatch in redclaration …

Member Avatar for Aia
0
805
Member Avatar for R_brahmankar

hi friends , i am rushikesh brahmankar . i am studying final year of BE COMPUTER . I AM REQUIRING SOME GOOD IDEAS WHICH CAN BE IMPLEMENTED AS BE PROJECT. I HAVE KNOWLEDGE OF C, C++,JAVA ORACLE. I AM READY TO DO PROJECT IN ABOVE LANGUAGES. I AM ALSO READY …

Member Avatar for ssharish2005
0
120
Member Avatar for programmer321

Hi All, I am trying to compress a text file using C. For example, if data written in a text file is ABCDEFGH, it occupies 8 bytes. I want it to occupy only 1 byte so that the size of the file can be reduced. Regards.

Member Avatar for ssharish2005
0
72
Member Avatar for asilter

how can i convert a void array to unsigned char array? could you plz give a little sample?

Member Avatar for ssharish2005
0
118
Member Avatar for DeathEvil

Ok, today is the final and I'm still confused with the struct. Last assignment was supposed to be transformaed from regular arrays to struct and even though I did it and it works, it's more like each member inside of a record is a array rather than array of records. …

Member Avatar for DeathEvil
0
111
Member Avatar for amitbhat

Hi Techis... I am given an assignment of writing a C program which behaves as assembler. That is implementing assmbler using C. I ll have set of assemply statements. I need to convert those into the machine equivalent binary representation. I ll have two data structures to keep track of …

Member Avatar for amitbhat
0
115
Member Avatar for acchao

Hi, my name is Andrew. I believe this will be my first post on daniweb so please bear with me. I'm working on a compression algorithm (miniSEED steim 2 compression if anyone is interested, its for seismic lossless compression) in C so I do a lot of bit manipulation of …

Member Avatar for Salem
0
627
Member Avatar for kgbalaji1980
Member Avatar for Ancient Dragon
0
117

The End.