15,540 Topics
| |
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) . … | |
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 … | |
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> … | |
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 = … | |
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 … | |
[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 … | |
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] … | |
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 … | |
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; … | |
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? | |
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 … | |
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 … | |
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 … | |
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; | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
Hi I need some ideas to force MQGET call fail on receiving interupt signal in AIX O/S. Thanks in Advance | |
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 … | |
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 … | |
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] //*********************** //* //* … | |
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 … | |
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 … | |
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 … | |
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"); … | |
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 … |
The End.