15,540 Topics

Member Avatar for
Member Avatar for Mr.UNOwen

Hello, This is similar to the thread I did a while back, except this time I need to do it under linux. I'm using the latest version of Ubuntu. Can some some one show me how to send information (an array of char) to the rs232 port (synchronous communication) . …

Member Avatar for jephthah
0
176
Member Avatar for death_oclock

I have the following globals defined (the relevant ones, anyway): [CODE=c] DWORD dwNumMaterials; LPD3DXBUFFER lpMaterials; LPD3DXMESH lpMeshBody; [/CODE] And the call to D3DLoadMeshFromX is here: [CODE=c] D3DXLoadMeshFromX(L"body.x", D3DXMESH_SYSTEMMEM, lpD3DDevice, NULL, &lpMaterials, NULL, &dwNumMaterials, &lpMeshBody); [/CODE] When this is called, it returns a generic error (0x80004005). Also, if it is needed …

Member Avatar for death_oclock
0
121
Member Avatar for mhil_joy

guys.. please check this program this is already running but i have no idea to insert a queue i need all your help guys as soon as possible. I hope that you will grant my request.. thank you... God Bless and more power.. [code=c] #include<stdio.h> #include<conio.h> #include<string.h> #include<iostream.h> #include<DOS.H> #include<process.h> …

Member Avatar for Aia
-2
81
Member Avatar for Clockowl

Hi guys, I've got two loops, and I want to be able to continue; the outermost loop when the innermost loop finds something. How would I do that? [code=c] //(...) for (n = startStorage; n < quadcount; n++) { if (!notOptimized(n, optimized)) continue; int *x = &quadindex[n*4]; for (eachX = …

Member Avatar for Clockowl
0
118
Member Avatar for Traicey
Member Avatar for mdew_47

I have posted the related topic in the Java forum! Now, i am having a very differnet problem altogether. 1. i am being able to call the C program from the Java frame using a "Button" in the inteface. 2. But the problem i am facing now is that the …

Member Avatar for Clockowl
0
98
Member Avatar for mancode1007

[ICODE] #include<stdio.h> struct student{ int id; char name[30]; int mark; }; void main() { FILE*fp; struct student stud; int id_no; fp=fopen("data.txt","r); printf("enter id no : "); scanf("%d",&id_no); while(fscanf(fp,"%d %s %d",stud.id,stud.name,stud.mark)!=EOF) { if(id_no == stud.id) printf("%d %[^\n] %d\n",id_no,stud.name,stud.mark); else printf("Error !\n"); } fclose(fp); } [/ICODE] Hello Everyone,I am stuck at the …

Member Avatar for jephthah
0
2K
Member Avatar for argus512

Hi People, I have been given to work on this program written some 15 years ago for data acquisition but i cannot figure out how to get this to compile as i am getting a lot of compilation errors. Any insight would be highly appriciated. Thanks in advance argus [code=c] …

Member Avatar for Ancient Dragon
0
176
Member Avatar for coolkeg

hi guys, I'm new to C language and am currently using an online tutorial, ive been doing prety well on my own until now. Basicly the problem is with the "while" command, when i copy and paste the code im working with from the tutorial site into a word pad …

Member Avatar for Aia
0
134
Member Avatar for plike922

When i run the program it shows the first line then blank i dont know whats wrong! [CODE]#include <cstdio> #include "simpio.h" #include "strlib.h" int main() { int i, d, t; printf("This program generates all perfect numbers from 1 to 100.\n"); t = 0; for (i=1; i<=100; i++) { for (d=1; …

Member Avatar for Aia
0
90
Member Avatar for symas

Suppose I have structure like: typedef struct { int a; int b; } my_struct; Is there any way to get/print the name of the fields of that structure (i.e. "a" and "b") programmatically?

Member Avatar for Radical Edward
0
201
Member Avatar for mancode1007

Hey guyz.. I want to know how to print certain line from the text file and certain part of the record for example data.txt... [CODE] 123 John Smith 80 222 chris brown 50 325 christine 60 [/CODE] I only want to print out the name from the record in the …

Member Avatar for Salem
0
123
Member Avatar for plike922

can you check the code... it doesn't work for some reason i tryied everything [CODE]#include <stdio.h> #include "genlib.h" #include "simpio.h" int Fibonacci(int fnum); int main() { int fnum; printf("Please enter in the Fibonacci number: "); fnum = GetInteger(); printf("The number for f(%d) is %d\n", fnum, Fibonacci(fnum)); system("pause"); } int Fibonacci(int …

Member Avatar for Aia
0
109
Member Avatar for sreesai

Hi, I want to know how to program to find memory leak. my idea is to find whether there is a free() for every malloc before exiting the function. x() { malloc() .... if() { abc return; // thr is a memory leak as thr is no free n we …

Member Avatar for dwks
0
126
Member Avatar for m_banerjeein

Hi All Guys few quick questions on C.. 1. What does "static void <function_name>(argument1,argument2)" means.. 2. Whether this would give a compilation error if i write this piece of code... int a =1 , b=2,c=3 ; (a=b)=c;

Member Avatar for jephthah
0
127
Member Avatar for me_roy

Dear All, I got difficulties here related with extracting max and min value from every column in array. So far i just can extract max-min value at a time by changing column index, stupid approach..eeeh, but i do it just for testing that code could extract right max and min …

Member Avatar for WaltP
0
431
Member Avatar for blrjohn

Hello guys, I m very much new on C. Need all of your help to improve. Right now I m getting one problem. I m writing the very basic program.. [code] #include <stdio.h> int main() { printf("Hello World!\n"); return 0; } [/code] When I complie it is showing success. But …

Member Avatar for Aia
0
118
Member Avatar for loimarie

hi to everyone!i need help for my assignment in our numerical analysis.our instructor asked us to solve a linear equation using turbo c language.Can anyone help me with this problem,a simple sample code will do.Ex.f(x)=2x^3+x^2

Member Avatar for jephthah
0
521
Member Avatar for flecture

i created a header file named "pop.h" and saved in tc->include folder.......the codes included in header file is shown below [code]#include<stdio.h> #include<conio.h> int ssipower(int,int); void main() { clrscr(); printf("power=%d",ssipower(3,3)); getch(); } int ssipower(int a, int b) { int i,c=1; for(i=1;i<=b;i++) { c=a*c; return c; } [/code] when i tried to …

Member Avatar for jephthah
0
81
Member Avatar for MaestroRage

I am trying to get the main to read in a number, and use that number to do a mod calculation. However my best efforts are giving me garbage values. I am sure I am not using the pointer correctly, yet my efforts have gone unrewarded. How can I get …

Member Avatar for jephthah
0
205
Member Avatar for Y_Game

Ive been trying to create a number guessing program were the program guesses your number instead of the user guessing the programs number heres what i have so far: [code=c] #include <stdio.h> int main(void) { int guess = 50; printf("Pick an integer from 1 to 100. I will try to …

Member Avatar for Aia
0
126
Member Avatar for madankumar

Hi I need some ideas to force MQGET call fail on receiving interupt signal in AIX O/S. Thanks in Advance

Member Avatar for Ancient Dragon
0
51
Member Avatar for flipjoebanana

Hello, I am trying to figure out how to use memory blocks and create a block of data that contains different data types within it. In my particular example I want a pointer to a memory block that contains a struct followed by an array of floats. This is what …

Member Avatar for Ancient Dragon
0
87
Member Avatar for sting_010

can anyone in here help me with my programming project. Your C program must be invoked exactly as follows: shell [batchFile] The command line arguments to your shell are to be interpreted as follows. batchFile: an optional argument (often indicated by square brackets as above). If present, your shell will …

Member Avatar for Salem
0
184
Member Avatar for the reaper

After finishing my lesson on loops and array initialization i managed to sit down for a good 15 min. and right a calculator now the code is perfectly clean but when i run it i doesn't do what i programmed it to do..here is the code [code] //*********************** //* //* …

Member Avatar for WaltP
0
246
Member Avatar for mjoshi

I have a codein which i want to do the following: main(int argc, char *argv[]) { fp1=fopen(argv[1], "w") function(para1, para2, ??) } function(para1, para2, ??) { fp2= fopen(argv[2], "r") } So eesentially i want to pass a few parameters and the pointer to the function. I dont know how to …

Member Avatar for Aia
0
403
Member Avatar for soppyhankins

I am trying to create a simple C program that uses HandBrake (video converter). The only way to run this program is to have one of the (in my opinion) crappy GUIs or to type out all of the arguments in the command line. My program is simpler than the …

Member Avatar for soppyhankins
0
92
Member Avatar for jess29

I just started teaching myself c with a book called practical c programming, and i can't figure out one of the exercises. I'm supposed to write a function that scans a character array for the character - and replace it with _. I tried doing it, but i don't think …

Member Avatar for jess29
0
104
Member Avatar for coolkeg

O.k i searched the site but didn't find anything related to my problem. all ive done is made a simple calculator using the "else if" command. I'll post my coding and compiler errors below. [code] #include <stdio.h> main() { int valid =0; char operator; float number1,number2,sum; printf("calculator\n"); printf("number\t operator\t number"); …

Member Avatar for Aia
1
123
Member Avatar for prog77

I need to know can i make a for loop to place fopen function to open a set of files like i want file1.in file2.in file3.in .......filen.in so on depending on n value i give for num of files to be created ... as i want to place set of …

Member Avatar for prog77
0
174

The End.