15,552 Topics

Member Avatar for
Member Avatar for gourav1

[CODE]#include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include<dos.h> #include<math.h> void midline(int,int,int,int); void main(void) { int gdriver = DETECT, gmode, errorcode; int xmax, ymax; initgraph(&gdriver, &gmode, ""); errorcode = graphresult(); if (errorcode != grOk) { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any key to halt:"); getch(); exit(1); } setcolor(getmaxcolor()); int x1,y1,x2,y2; …

Member Avatar for swissknife007
0
146
Member Avatar for Lillylionhert

I was just wandering if there was a way to put information in to a string but increment a section of the text when putting it in the string. To put it simply: [CODE]string="to be put in string[this is to be incremented]";[/CODE] I was wandering if there is a way …

Member Avatar for Lillylionhert
0
130
Member Avatar for domatessuyu

Hey, i want to enter a number by user. [CODE]printf("Enter a number: "); scanf("%d",&number);[/CODE] but,user enter text.i mean: [B]Enter a number:[/B] One Now,i want to convert this text to number. [I]I hope,i tell my problem.Sorry my bad english.[/I]

Member Avatar for domatessuyu
0
164
Member Avatar for Lillylionhert

please disregard this as i have figured out what was going on. i will delete this as soon as i know how.

0
114
Member Avatar for gourav1

[CODE]#include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include<dos.h> #include<math.h> union REGS in,out; void hide_mouse(); void show_mouse(); void detect_mouse(); void detect(int*,int*,int*); void main(void) { int gdriver = DETECT, gmode, errorcode; int xmax, ymax; initgraph(&gdriver, &gmode, ""); errorcode = graphresult(); if (errorcode != grOk) { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any …

Member Avatar for DeanMSands3
0
178
Member Avatar for vedro-compota

Hi there)) I know that one of the ways to pass variables values into thread -is to create a special structure which includes all needed parameters/ But what about getting values from thread? Is it any way to get value after modification from the thread ? I know only one …

Member Avatar for vedro-compota
0
220
Member Avatar for history

********* ****s**** ***sss*** **sssss** *sssssss* Where "s" means space.. Need a simple syntax coz I am a new student. Help me fast. I am totally stucked here......... Thanks and best regards, Lost history:)

Member Avatar for peter_budo
-1
80
Member Avatar for mcddewitt

Hello. I am having trouble figuring out how to return the sum. I have 2 files p1.c and p2.c p1.c contains my main which calls createAndCOunt like this: [CODE] printf("The value is %d\n",createAndCount());[/CODE] p1.c also contains count which is called by createAndCOunt count is: [CODE]int count (int* array) { int …

Member Avatar for subith86
0
222
Member Avatar for neeludhiman

Hi friends, Can anyone tell me how can we get message boxes (e.g, with buttons OK, Cancel) in C ? Please guide. Thanks, Neelu

Member Avatar for rishabh413
1
17K
Member Avatar for shubham.joy

[CODE=c]#include <stdio.h> #define max( a, b) a > b ? a:b int main() { int i, j = 10; int k = 15; for( i = 0; i < max( j, k ); i++ ) { printf( "\nhi" ); } return 0; } [/CODE] The above code generates an infinite …

Member Avatar for nezachem
0
244
Member Avatar for shantanusinghal

My distributed operating system lab requires me to implement the election algorithm (bully and ring) in c. My current idea is to run several instances of an ouput file on different terminal, each symbolizing a different process. Now i'm facing the following problem and if you guys could just point …

Member Avatar for DeanMSands3
0
298
Member Avatar for DarkMonarch

hey guys, i have some work to do in C on a windows platform, windows 7 actually. now i've look into the suggested IDE compiler combo you guys suggested and i've pickup Dev c++ i just type a test program, just to see how the compiler works [CODE] #include <stdio.h> …

Member Avatar for DarkMonarch
0
257
Member Avatar for sync101

Hello, my assignment is to write a postfix calculator. I have written the program. It works well, except for when the user enters in an error. Lets say, user enters "2 A +" it changes the A to a '0'. Which it shouldn't be doing. I have tried strtol() as …

Member Avatar for WaltP
0
188
Member Avatar for see_moonlight

what function can delete a space in a string? i want to find a c function , e.g. delspace(char *string) string = "abc d e" and delspace(string)-> "abcde" thanks, i want C function

Member Avatar for isaacws
0
571
Member Avatar for gourav1

my teacher has told me to make a flag(India's national flag) in C using lines, bar and all. then fill colors. i have done this thing when i am writing this thread. now, he also told me now that the flag should look like as if it waving in the …

Member Avatar for DeanMSands3
0
1K
Member Avatar for Bladtman242

Obviously I have some wrong assumptions, because this prints "strsize = 8" no matter what. I realize my use of system() might be misguided, so if you have comments on that don't hold back, just please help out with the string-thing aswell : ) BTW it's a 'wrapper' for shell …

Member Avatar for Bladtman242
0
177
Member Avatar for joy39

if we have to insert records into a mysql database using c api then the general code is this [CODE]if (mysql_query(conn, "insert into empinfo values ('saikat banerjee')")) { printf("4Error %u: %s\n", mysql_errno(conn), mysql_error(conn)); exit(1); } [/CODE] but, here we have to enter the record from the code itself . but, …

Member Avatar for fobos
0
147
Member Avatar for samidha

[code] #include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> #define M 20 #define hr printf("\n----------------------------"); #define br printf("\n"); int mptr=0,pptr=0,sptr=0; struct input_code { char lbl[M]; char instr[M]; char op1[M]; char op2[M]; }input[M]; struct opcode_table { int num; char name[M]; int code; struct opcode_table *chain; }mot[26],pot[26]; struct symbol_table { int num; char sym[M]; int addr; …

0
136
Member Avatar for raj236712

i want to create shapes like circles,rectangles and others with the help of c language programming.basically i want to make the sign of matrix in my program.how can i do this?

Member Avatar for WaltP
0
575
Member Avatar for HadoukenGr

[CODE]#include<stdio.h> #include<string.h> void FindWord (char used[30] , char string[30] , int wordsize); char* CleanString (char string[30], int wordsize); int main (void) { FILE *fp; char letters[30]; char words[30]; char used[30]; char *string; int wordsize; int input_size; input_size = wordsize = 0; fp = fopen("dictionary.txt","r");/*contains a list of words in the …

Member Avatar for HadoukenGr
0
146
Member Avatar for mackieben04

I Having Problems with my program. I hope someone will help me with my problems. By the way, I need help regarding Going Back to Menu using Loop. Thank you very much! if you have seen any problems, please post your message. Thanks! [CODE]#include <stdio.h> void main() { float usd, …

Member Avatar for mackieben04
0
219
Member Avatar for YAMNA MIDHAT

this is my code .can any one please tell me why the program is not giving proper results?? [CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> //2d linked list major aasg#1 //structure type struct items { int id; //item no; char name[]; int price; char color[]; items *previous; items *next; }; //functions sort(); show_all(); …

Member Avatar for ChrisPadgham
-2
164
Member Avatar for dedenfk

I want to know how to write a program to print A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Input = A M output = N z

Member Avatar for Greg_R
0
133
Member Avatar for rafzk

Hello, Iam getting a strange error and I dont know how to solve it. Can you help me? Iam trying to make a dictionaire using BST. [CODE] // Task3.cpp : BST #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <Windows.h> #define cabecalho "---------------------------------------------------------\nDICTIONAIRE\n\nEnglish to Portuguese\n---------------------------------------------------------\n" #define color(y) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), y); #define LEFT …

Member Avatar for rubberman
0
257
Member Avatar for Lowchernhwee

well i check all the web, i still do not know how to save it as a jpg and if possible, load and edit a picture from jpg here is a simple code that i done for drawing...... [CODE]namespace @try { using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using …

Member Avatar for zeroliken
0
145
Member Avatar for theCompiler

can someone please tell me how am i suppose to start my program ? i have 20 integers (1-20) the user will input what number should start and the count interval . its a bit confusing only 5 numbers should be left numbers who are already counted will not be …

Member Avatar for WaltP
0
131
Member Avatar for ahp@aol.in

Hi folks, I've simple question regarding following code. [CODE] int main() { int i =5; printf("%d %d %d\n",i,i++,++i); // 7, 6, 7 return 0; } [/CODE] The answer is [B]7 6 7[/B]. I want to know how it is coming. Please help. Thanks, Amar

Member Avatar for jumbowat
0
800
Member Avatar for mrprassad

[CODE] swap (char *p, char *q) { printf ("%c\t%c\n", *p, *q); *p ^= *q ^= *p ^= *q; printf ("%c\t%c\n", *p, *q); } int main (int argc, char *argv[]) { if (argc < 2) { printf ("\nSyntax: ./a.out str\n\n"); exit (1); } char *p, *q, temp; p = q = …

Member Avatar for Narue
0
151
Member Avatar for srinidelite

#include<stdio.h> int main() { int i; typedef struct BookDB { int iPageNo[10]; char cBookName[10]; } b1[5],*b2; // *pvBookDB = &vBookDB; b2 = &b1; printf("Enter the pageno folloed by bookname for 5 books at at time"); for(i=0;i<=5;i++) { scanf("%d,%s",b2[i].iPageNo,b2[i].cBookName); } for(i=0;i<=5;i++) { printf("%d,%s",b2[i]->iPageNo,b2[i]->cBookName); } return 0; }

Member Avatar for jumbowat
0
138
Member Avatar for trinetra31

Hi, i have to compile some coding to show how dtmf works. Any idea how? I see most of it uses unix c or linux programming? I have only been programming with windows C. Pls do guide me step by step on how to program in these languages. here are …

Member Avatar for BobS0327
0
272

The End.