18,491 Topics

Member Avatar for
Member Avatar for dmanw100

Is there an easy way to convert from Char* to int? I have tried converting as such: [CODE]char* value_a; int* temp = value_a; int final = temp;[/CODE] The compiler is returning an error so I know something is wrong but why can't I convert this way? Any suggestions as to …

Member Avatar for ArkM
0
193
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
90
Member Avatar for Ancient Dragon

For those of you who have been working for some time I'd like to find out what practical uses you have seen for recursion. I'm not talking about college courses or what you see in tutorials, but what programmers use it for in real-world programs such as system, applications, etc. …

Member Avatar for sciwizeh
0
830
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
134
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
118
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
3K
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
203
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
157
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
110
Member Avatar for mdew_47

i have been given a 2-phase compiler containig the lexical phase and the syntax phase as my final year project. for that i need to know how to call a C program from a Java applet using a button called "compile". A little help will make me thankful.

Member Avatar for mdew_47
0
237
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
329
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
137
Member Avatar for RaooF

Hi, I want to get the IP addresses list of a DNS or a DHCP. Any help like how to write the code in c, c++, or C# will be appreciated. Thanks in advance.

0
68
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
128
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
150
Member Avatar for m_banerjeein

Great to be part of this forum filled with enthusiatic people of computing world... Working as telecom professional in India... Love coding in C , C++ and like to discover the arcane topics associated with these languages.

Member Avatar for zandiago
0
51
Member Avatar for blrjohn

Hi guys, This is John from Bangalore, India. Profession : Teaching (presently National Institute of Computer Technology) Age : 24 City : Bangalore Country : India I am a novice computer user. Wanna be web designer. Trying to improve whatever I required to be a Web Designer / developer. My …

Member Avatar for zandiago
0
147
Member Avatar for SheikhAman

Hello guys. Iam Aman Alam, from Lucknow India. i have just finished my computer grad and am now pursuing my masters. have been a pure java guy in my grad as i designed, developed, and leaded a software project for an Hotel in Lucknow. Iam also good in C and …

Member Avatar for zandiago
0
136
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
145
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
453
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
151
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
552
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
95
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
237
Member Avatar for Sundarararjan

Also do tel me what is the process of creating functions in seperate files and referencing them under a single file. I use a dev-C++ for my coding

Member Avatar for Salem
0
87
Member Avatar for bignick270

I have source code written in assembly for a radio tag and we need a quick way to change the id number each time it is programmed. My background is in C and I want to know if there is an equivalent to C's #define statement in assembly. The #define …

Member Avatar for abhisdm
0
88
Member Avatar for karthik-selvam

Hi Everybody, I need a Guide For helping in my Linux Programming. I am interested to kernel development Programming. I done B.E-Electronics and Communicatiion Engineering. I know the Basics of C. So Help Me to Step by Step On my new programming like how to compile?, how to debug?, which …

Member Avatar for ithelp
0
175
Member Avatar for coveredinflies

Hi, sorry if this has been asked before I did a search but couldn't find it. How do I define a pointer to a 2D array? (I am trying to pass it into a function). Thanks.

Member Avatar for ArkM
0
486
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
152
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
62
Member Avatar for loken

Greetings! I would just like to ask you guys something. I am planning to create my mini 3d game...Do you guys know any good steps to start with....I have programming knowledge in C, C++, Java, Javascript, Perl, Php and Openlaszlo... I am also studying LindenScript and OpenGL.... Can anyone provide …

Member Avatar for suszen
0
230
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
107
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
221
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
290
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
440
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
116
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
137
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
141
Member Avatar for AndreC

This is a very quick and easy question: How do I move a literal value into a register? I need to move the value 2 into a register with address 0x0800 of a dsPIC30F6014A. I have tried the following: [CODE]MOV #0x0002, [0x0802];[/CODE] but I get an error message stating "Invalid …

Member Avatar for abhisdm
0
105
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
198
Member Avatar for it2051229

I tried creating a program that computes for a factorial of a number. So assuming that the user has entered a SINGLE digit number like '5' the output would be '120'. Every input is a hexadecimal so I converted the input '5' hexadecimal into it's decimal version and there were …

Member Avatar for it2051229
0
100
Member Avatar for Andriy_Gonz
Member Avatar for vijaysoft1

I am trying to to Develop a Dictionary in C and it is completed almost . I want to create a List box (Auto Complete) Function . I created the List box as same as the image . And loaded the array into it . Initially the list is A-Z …

Member Avatar for Prabakar
0
296
Member Avatar for friendlyguy

i got sent to this site because i needed help compiling a/3 source codes... thank!

Member Avatar for zandiago
0
43
Member Avatar for madankumar

HI I would like to pass new argument to cureently running process with out interuption in unix using c code can any one Idea on this Please suggest Thanks in Advance Madan

Member Avatar for madankumar
0
92
Member Avatar for the reaper

hello all...i need help with the code below.. [code] #include <stdio.h> #include <windows.h> main() { MessageBox(0,"hello world","hello world",0); fflush(stdin); getchar(); } [/code] now i know it is perfectly clean code...but the problem is if i put 2 messagebox functions linke this [code] #include <stdio.h> #include <windows.h> main() { MessageBox(0,"hello world","hello …

Member Avatar for the reaper
0
147
Member Avatar for plike922

i am trying to write a program that finds all twin primes between 1 and 100. any suggestions? [CODE]#include <stdio.h> #include "genlib.h" #include "simpio.h" int main() { int n1, n2, y, x; printf("This program list all the twin primes.\n"); for (y = 3; y <= 98; y += 2) { …

Member Avatar for jaikjoel
0
301
Member Avatar for phickman7872

Hi all, I am new to C on linux and have a question about I/O. I am trying to read input from the command-line: printf("What is your first name? "); scanf("%s", firstName); printf("What is your last name? "); scanf("%s", lastName); printf("What is your age? "); scanf("%d", &age); printf("What street do …

Member Avatar for yap.nice
0
424
Member Avatar for abhisdm

I'm getting an error msg as Type mismatch in redeclaration of 'putw' for the following code... Can anyone suggest the reason for this??? [code]#include<stdio.h> union pw{ short int i; char ch[2]; }; int putw(short int num, FILE *fp); int main() { FILE *fp; fp=fopen("test.tmp","wb+"); putw(1000,fp); fclose(fp); return 0; } int …

Member Avatar for ArkM
0
171

The End.