19,876 Topics

Member Avatar for
Member Avatar for vishalkhialani

Hello, I am saving my data in a text file. I can successfully access my file and add records in it and even search it. but when it comes to del a record i dont know how to do it. Can some one please advice. Regards, Vishal

Member Avatar for 1988Rhythm
0
183
Member Avatar for ramy89

Hello to everyone,I'm using a Borland BCC55 compiler to describe the logarithm function. It works fine,but only with numbers higher than 1,if I insert any floating point the result stucks on -46,whatacer number <1 I write. Here is the function,I made it myself (on a text host): [url]http://freetexthost.com/kv0rdi4gno[/url] Of course …

Member Avatar for ramy89
0
113
Member Avatar for fussballer

Hi, I am working on a project, I need to control a CD Drive via the IDE/ATA Interface using a C/C++ program. My goal is to control the Speed of the Drive, and hopefully the radial position of the optical pickup head. I am still fairly new to this field, …

Member Avatar for rajeevpareek
0
273
Member Avatar for 234pramod

Hi, I am trying to send data over wifi using socket. I am working Ubuntu. The data to be sent is received from a device over serial port. I want to create a virtual serial port which will read data from a file and present it in way serial port …

Member Avatar for Nick Evan
0
80
Member Avatar for hasbeenbad

Hail! Wise and Glorious Gods of C Coding. I have written a little function to search an array and it is cousing the program to hang after I enter the search criteria,It should should the array for a match and then return the whole string it was found in. There …

Member Avatar for Greg8202
0
115
Member Avatar for newbiecoder

Hello I want to have a code which gives a random value faster than a value per second. Here is my code: [CODE]#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int x; srand(time(NULL)); x = rand()%100 +1; printf("%d", x); return 0; } [/CODE] Can you please tell me how …

Member Avatar for newbiecoder
0
126
Member Avatar for Xpress2010

Helo, I need calculete Spaces in file. Maybe can write this function. Thank you P.S Sory for may english

Member Avatar for UncleLeroy
0
101
Member Avatar for 234pramod

Hi, I am trying to send data over wifi using socket. I am working Ubuntu. The data to send i receive from a device over serial port. I want to create a virtual terminal which send which act as serial port sending data from a file. Can anyone help me …

Member Avatar for 234pramod
0
121
Member Avatar for nozzers

hi i have a problem, trying to set a form to open a new window, this is what ive got ... private void newWindowToolStripMenuItem_Click(object sender, EventArgs e) { this.browser.NewWindow(); } any ideas why it isn't working?

Member Avatar for PierlucSS
0
94
Member Avatar for hasbeenbad

Hello, I have a question, if you please. I have been trying to fill an array with values from a text file for hours. I has been 12 years since I have used any C code, and I thought I would be able to remember this. I have an opportunity …

Member Avatar for Adak
0
1K
Member Avatar for arpanm

Hi all, My code is giving the desired o/p, but at the end its producing segmentation fault. (I know this is very column and also I have checked other posts, but couldn't understand the solution) Here is my code[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "blake.h" int genShortMsg(int …

Member Avatar for arpanm
0
138
Member Avatar for Sukhbir

void main() { int i=1; printf("%d,%d,%d",i++,i++,i++); } output 3,2,1 CAN SOMEONRE EXPLAIN ME WHY?

Member Avatar for sanagopi
-1
235
Member Avatar for omiyehan
Member Avatar for sanagopi
-1
77
Member Avatar for gjohnsonjr

This is a newbie question. I am creating a simple one-table Movie tracking program. I have dragged a db table onto the simple form creating a dataGridView. I am using a List box and some Text boxes to enter new data. For the life of me, I cannot get the …

Member Avatar for finito
0
400
Member Avatar for prashanth s j

Hi all, the following code prints garbage values. I want to read from an array two bytes and print then as a short int after doing ntohs. What is the bug in the code? Thanks and Regards, Prashanth [code] #include<stdio.h> struct converter { unsigned short int i; }; main() { …

Member Avatar for prashanth s j
0
194
Member Avatar for sanagopi

[code] main() { int i=0xff; printf("\n%d",i<<2); } [/code] please tell me how to work out this code... and what will be the output...

Member Avatar for Banfa
0
2K
Member Avatar for melusim

I am tring to pass an array to a function but when i compile it says array undeclared first use in function.i thought once i pass it as parameter it becomes known by the function.here is my code: /* Write a program that reads quizzes from a file 'q.txt', randomly …

Member Avatar for terminato
-1
266
Member Avatar for doc15

Hey there, So I've looked everywhere for help with my assignment until finally I found this useful service. I'm a C++ beginner and so far the problem solving and coding have fulfilled all expectations. If there is anyone to offer suggestions for my assignment, that'd be amazing! What it is …

Member Avatar for doc15
0
1K
Member Avatar for gerard4143

I have a question about functions and pointers to functions.... Why does a C program treat a function call to a function and a function call to a function pointer the same? [CODE] #include <stdio.h> #include <stdlib.h> typedef void (*funcptr)(void); void myfunc(void) { fputs("Hello, World!\n", stdout); } int main(int argc, …

Member Avatar for gerard4143
0
177
Member Avatar for MrNoob

hi, I have some problems with winsock library so I am calling loading it dynmically then calling the functions so far so good,but the problem is for example I see in the winsock2 header files that - GetHostByName and some other functions are which I use there prototypes is kinda …

Member Avatar for UncleLeroy
0
98
Member Avatar for manutd4life

Hello, i need to do a program which takes an input sequence of characters from the alphabet {A,B,C} and compresses it by replacing each subsequence of a particular character by a single occurrence of the character, and the length of the substring. e.g. Input : AAAAABBBBBBBCCBBBAABBCCCCCS Output: A5B7C2B3A2B2C5 i dont …

Member Avatar for manutd4life
0
166
Member Avatar for sanagopi

i need a detail explanation about left shift and right shift operators in c..its very hard to understand it..especially when i am using shifting on hex and oct values...seems to quite confusing me...i got the output..but i dunno how it comes...please clear my doubts.. thank you

Member Avatar for sanagopi
0
131
Member Avatar for niyujin

My English is very poor...there must be a lot of mistake in my expressions. but It would be very kind if you can answer my question... 3Q. In c compiler ( vs 2010 express c++), I tried the code as follow, 0 error 0 waring. In C++, it is the …

Member Avatar for gusano79
0
201
Member Avatar for yuvaraj.ragupat

Hi, I want to read ctrl-c ctrl-z values from serial port. is there any ways to read? Regards Yuvaraj

Member Avatar for yuvaraj.ragupat
0
78
Member Avatar for georgioarmani

Hello all! I Have browsed this forum a lot for solutions and have found it very helpful! I am wondering if someone could help me with the OleDB Connection. I am using it to first create a table called imgDBF. I have been succesful in getting my code to create …

Member Avatar for kvprajapati
0
198
Member Avatar for tomtetlaw

whenever i run this code: [code=c] void _freecommands(void) { command_t *com; for(com = cmd.commands; com->name; com = com->next) free (com); } [/code] i get one, even though i've malloc'd them previously and the conditional statement checks if they're not valid i don't understand why, can someone help me?

Member Avatar for Radical Edward
0
60
Member Avatar for idlackage

I'm reading in a text file that contains a little custom script. However, one line of that script gets ignored and I can't figure out why. Script: [CODE]# Test Case #1 - Simple Movement RESET FORWARD 2 PAUSE 1 REVERSE 2 PAUSE 2 TURNRIGHT 2 PAUSE 1 TURNLEFT 2 PAUSE …

Member Avatar for Radical Edward
0
98
Member Avatar for Mikey12345

Hi, Ive been trying to calculate standard deviation from the data in my datagridview.I have manage to work out how to get to the last value but would like to display in a chart so i need to have some kind of running total like you have in Excel. For …

Member Avatar for kvprajapati
0
98
Member Avatar for rai32

Hello guys, i am making a simple test using select() for a future program i must do. What i'm trying to do is very simple, i have a client, and a server. The client listens to both stdin and sockfd using select. The objective is as follows: If i write …

Member Avatar for rai32
0
313
Member Avatar for tomtetlaw

when i run this code, f is being set to null and i have no idea why.. i know for a fact that cmd.argv(1) at that point is "vars.rc" because i debugged it with breakpoints. [code=c] FILE *f; if(cmd.argc() != 2) { con.printf("writevars: <filename>\n"); return; } f = fopen(cmd.argv(1), "w"); …

Member Avatar for tomtetlaw
0
2K
Member Avatar for tam13

Hi, So I'm new to C and I'm trying to get the max temp from my user input and the print out in a table the temperature's from 0 to max temp in celsius and fahrenheit. However I can't seem to get the maxtemp from my getinput function. I was …

Member Avatar for aspire1
0
108
Member Avatar for sanagopi

[code]main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); }[/code] i have doubt in this program where we are using 2 scanf statment which is nested one...y we are using +scanf..is this corect?? if so please expalin it..

Member Avatar for Adak
0
91
Member Avatar for Him3

Hi, Everybody, I wrote the program to connect to the Microsoft Sql server 2000. I have also defined constrains and triggers on Tables of SQL. Now I want to catch the error message generated by the triggers or constraints in c prog and want to show it to user. Can …

Member Avatar for monu chauhan
0
475
Member Avatar for Neen14

how I can simplify fraction after do some process on it (add, sub...) this part of program (add fraction) [CODE]int i,j,k,m,a,b,c,d; char x; printf("Please Enter fraction number 1\n"); scanf( "%d%c%d",&a,&x,&b); printf("please Enter fraction number 2\n"); scanf("%d%c%d",&c,&x,&d); if (b == 0 || d == 0){ printf("undife number\n"); system ("pause"); } else …

Member Avatar for wildgoose
0
126
Member Avatar for iwanttolearnc

[CODE]return((int)ADHR << 2);[/CODE] im trying to learn what a certain function does and then i stumble upon this part. i do get that << 2 means shift left by 2. what i do not know is the (int)ADHR part. can anyone help me out with this? thank you

Member Avatar for iwanttolearnc
0
102
Member Avatar for Alerwiali

i have a 2D matrix of characters or integer or whatever!How do i check if another matrix is a sub-matrix of The 2D one ...Please!! help with simple code that work for any size of the matrices Thanks in advance to all

Member Avatar for Alerwiali
0
67
Member Avatar for Ferny84

I'm supposed to ask the user to enter a number of marks, and to decide what each mark is. Then my program is supposed to find the min and max in the array, so far this is what my code looks like: [CODE]#include <stdio.h> void findMinAndMax(int arrayMarks[], int numOfMarks) { …

Member Avatar for Ferny84
0
135
Member Avatar for newcoder777

Hi everyone, can somebody guide me to produce very small delays for controlling a servo motor using PWM. I need to generate 3 different pulse widths of 1.2ms , 1.5ms and 1.8ms. I am using Keil compiler, and 8051 microcontroller. I am a good C coder, but dont understand much …

Member Avatar for newcoder777
0
287
Member Avatar for nada massoud
Member Avatar for abhimanipal
0
33
Member Avatar for yasemin

Hi, Im having trouble dealing with text files in C. I want to be able to move through the text file which Ive used fseek(). But how do I read one character or read a line of characters from the position I want and change these to float? Thanks in …

Member Avatar for abhimanipal
0
131
Member Avatar for sdinu96

I want database management in C To ADD,LIST,DELETE,INSERT using structures and files..........not in linked list.............. can anyone help me out....because this is the first time to do long and some what complex program for me

Member Avatar for abhimanipal
0
5K
Member Avatar for lewashby

Could anyone point me to a good C++ compiler for Ubuntu, other than Mono. Note that I was using Visual C++ 6. thanks.

Member Avatar for hyperbyte
0
134
Member Avatar for device

I want to take out words that reoccur in array1 and put them in array3. (so in array 3 there would be only distinct values) the problem is.. i dont understand how the count2 value can reach so high. (over 300) but should be 20 maximum. [code=c] for(i=0; i<count;i++){ if(count2==0){ …

Member Avatar for WaltP
0
93
Member Avatar for iwanttolearnc

im trying to use c to interface with a zilog microcontroller. the problem is that i cant do much without the library <ez8.h>. ive been searching the web now for any links to download this particular library to no avail. does anyone know where i can get this library? thanks …

Member Avatar for iwanttolearnc
0
156
Member Avatar for learnerAccess

[code = c] #include <stdio.h> #include <string.h> int main() { int n = 0x000000FF, i; char *p = (char *)&n; for(i = 0; i < sizeof(int); i++) printf ("value : %d\n", *(int *)(p + i)); return 0; } [/code] I'm expecting something like 255 0 0 0 OR 0 0 …

Member Avatar for learnerAccess
0
91
Member Avatar for littlestewie

[CODE]#include <stdlib.h> #include<iostream> #include<conio.h> typedef struct kume1{ int data; struct kume1 *next; }; typedef kume1 *kume1ptr; void insert(kume1ptr *x,int a); void del(kume1ptr *x); int main(){ int t=1; kume1ptr first1=NULL; kume1ptr first2=NULL; int x; int i; for( i=10;i>=1;i--)//ikisi içinde 20 şer tane random sayı üretiyoruz { x=rand() % 100 + 1; …

Member Avatar for abhimanipal
0
104
Member Avatar for toddermohan

[CODE]#include<stdio.h> main() { FILE *fp; fp=fopen(*PR1.c","r"); if(fp==NULL) { puts("cannot open"); exit() } }[/CODE] -------------- in this program why they are using *fp and pl reason full program.. and also how fp=fopen(*PR1.c","r"); works

Member Avatar for Radical Edward
0
119
Member Avatar for disablealex

Hello guys!i am kinda new to C# and i am just learning....the thing is..i want to make a little app.I made something like a login form with a username and password textbox.i need these textboxes to go into the acces database(which i succesfully added to the project and all it …

Member Avatar for Ramy Mahrous
0
202
Member Avatar for toddermohan

[CODE]FILE *fp fp=fopen ( const char * filename, const char * mode ); //// or //// FILE * fopen ( const char * filename, const char * mode );[/CODE] if i am asked to say "how u say?" in c language like direct command line code or what.. they say...

Member Avatar for tesuji
0
118
Member Avatar for EricTetz

Is is possible to define a method which returns a delegate, without first creating a delegate type? For instance, in C or C++ I can define a function pointer type, then define a function which returns a function pointer of that type: [code=c]typedef int (*IntVoid)(); // function pointer type IntVoid …

Member Avatar for EricTetz
0
360

The End.