19,876 Topics

Member Avatar for
Member Avatar for krizhan4u

i already have sql database ,server,login,password,,,i have to check from visual studio windows form,,,,to check test connection

Member Avatar for thines01
0
32
Member Avatar for joy39

i have to write a c program which connects with the mysql database. i have installed visual studio c++ express 2010 and the mysql installer for windows. i have widows xp os. can anyone tell me the step by step process to connect to the mysql database. and give me …

Member Avatar for StephNicolaou
0
89
Member Avatar for joy39

i have downloaded pdcurses and installed it. and , right now i am studying a ncurses tutorial , [url]http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/intro.html[/url] there are some sample examples also. but, when i try to compile "form" code examples , i see that there are no <form.h> header file in the pdcurses installation. has, anyone …

Member Avatar for L7Sqr
0
132
Member Avatar for Stefano Mtangoo

Hi friends, I need to make a simple parser for parsing PHP files (classes, functions et al) and I have read both Flex and Bison manual. I have read somewhere that I must build Abstract Syntax Tree (AST) and utilize that. But I cannot find any tutorial on how to …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for bluewhale628

Hello everyone! I am currently working on creating a Poker Simulation using the language C++. However, I am having issues with my swap function and also creating the conditions, such as declaring a Flush or Pair. Here is the code I have so far, and if you can assist me …

Member Avatar for Lerner
0
589
Member Avatar for kotsarikos

Dear all, how can i make a program that count the different words in a text(input stop with EOF) and the number of the lines which a word appears?

Member Avatar for DeanMSands3
0
105
Member Avatar for YAMNA MIDHAT

Hi, i am making a text editor with mouse programming.Given is my code .the compiler is not giving any error but i am unable to use enter,delete,backspace and arrow keys . can any one please tell me the logic with which i can make my project more better. THANKS in …

Member Avatar for WaltP
0
189
Member Avatar for gourav1

[CODE]#include<stdio.h> #include<conio.h> int main() { FILE *p,*p2; char c; long l; long x; p=fopen("file1.txt","w"); printf("enter the content of file:"); while(c=getchar()!=EOF) { putc(c,p); } fclose(p); p=fopen("file1.txt","r"); // l=fseek(p,1L,2); l=ftell(p); p2=fopen("file2.txt","r"); c=getc(p); while(l!=-1) { if(c==' ') { x=ftell(p); // fseek(p,-1L,1); while(c=getc(p)!=' ') { putc(c,p2); fseek(p,-2L,1); } // fseek(p,x+1,0); } fseek(p,x,0); l=ftell(p); c=getc(p); …

Member Avatar for gourav1
0
275
Member Avatar for Morbane

I have a menu: [code] #include <exec/types.h> #include <intuition/intuition.h> #include <libraries/gadtools.h> /* Prototypes for system functions. */ #include <proto/exec.h> #include <proto/intuition.h> #include <proto/gadtools.h> /* ANSI C includes. */ #include <stdio.h> struct IntuitionBase *IntuitionBase = NULL; struct Library *GadToolsBase = NULL; struct NewMenu window_menu[] = { { NM_TITLE, "Project", 0 , …

Member Avatar for Morbane
0
143
Member Avatar for Ararat

Hi guys i have a problem with my code :[CODE]#include<stdio.h> #include<string.h> #include <stdlib.h> #include <conio.h> struct blahblah { char id[11]; char name[30]; float gpa; }lol[100]; int main(){ int count = 0; char name [50][100] ; for(int i =0;i<=4;i++){ printf ("Student %d\n",i+1); printf ("ID: "); gets(lol[i].id); printf("Name: "); gets(lol[i].name); printf ("GPA …

Member Avatar for Ararat
0
311
Member Avatar for naz1234

Hi, do you know why my output does not working properly.. Actually my output should looping,but it straightly ending the program.. [CODE]#include<conio.h> #include<stdio.h> int main () { int choice = 0 ; while ((choice>=1)&&(choice<=5)) { printf ("\nPlease Choose No 1 , 2 , 3 , 4 , 5\n"); printf ("Enter …

Member Avatar for naz1234
0
154
Member Avatar for naz1234

Hello do you know why my output not looping ? Even I already use "do" to make this code for looping.. [CODE]#include <stdio.h> #include <conio.h> int main () { int hari; double duit; do { printf ("Mari rent kerete..."); printf ("\nkalau 1 hari = 100"); printf ("\nkalau 2-4 hari = …

Member Avatar for DJSAN10
0
136
Member Avatar for siaswar

Hi, I used C# and VS2010 for doing my projects. Some how, now I should write a program in C++ with database and GUI. The program's language is Persian, So Button's text and data in database should be in Persian. Please Guide me in this case. how to use Unicode …

Member Avatar for daviddoria
0
176
Member Avatar for DarkPyros

im wrote a program to determine weather a triangle is scalene, isosceles or equilateral based on the given side lengths...its not working properly..i.e its giving isoceles when i enter data for an equilateral...etc etc... i fugured it was my logic in writing the program that was missing something....could anyone tell …

Member Avatar for WaltP
0
205
Member Avatar for Talli

Hello everyone, I am passionate about programming have started learning C++ and finished studying one book about it. I am done with the basics like pointers, arrays, variables, objects etc. What I need now is some way to go on from here and learn how professional programs are made and …

Member Avatar for Talli
0
477
Member Avatar for srinidelite

[CODE]int a[10][20][30][40]; int *p[/CODE] How to access an element of a using p? .... PLs provide the actual code for the solution

Member Avatar for Moschops
0
79
Member Avatar for Ararat

Hi, i want to make a program that lets the user input as many numbers as they like and terminates when the user enters "EXIT" and prints the largest & smallest input, heres my code: [CODE]#include<stdio.h> #include<string.h> #include <stdlib.h> int main (){ int input; int min,max,a=0; char exit[] = "EXIT"; …

Member Avatar for prakash2813
0
1K
Member Avatar for brendono978

Program 66: Tromino Tiling An N x N (where N is a power of two) chessboard can be tiled with L-shaped tiles that cover three squares so that any given square and only that square is left uncovered. Assume that the rows of the board are numbered from one to …

Member Avatar for D_Unforgiven
1
494
Member Avatar for joy39

i have a project(sort of) where i have to write a c programto take in user inputs and store it into a mysql database for future retreival. now, i have written the program for console mode. ie it asks the user [quote]please enter a name [/quote] and then the name …

Member Avatar for zeroliken
0
147
Member Avatar for shibu2all

Can anyone pls explain the output for this [CODE=c] int main() { int i=10; printf("%d %d %d",i++,--i,i); return 0; [/CODE] according to me the o/p should be 9 9 10 however gcc compiler is giving o/p is 9 10 10 can anyone explain me this....

Member Avatar for Shardendu
0
137
Member Avatar for The 42nd

Well, hello. I have a problem with reading data from binary files into arrays. For example, let's say that we have d.bin file which contains pairs of strings with max lenght of 32 chars and double values like this: string12.334343 AS34.34 something3 where the string always takes up 32 bytes. …

Member Avatar for asrockw7
0
2K
Member Avatar for stunnablaze

Who can calculate tax in C using Control Statement, Arrays, Functions and Pointers... if you are so good show me what you Got...

Member Avatar for VernonDozier
-1
57
Member Avatar for pororo11

Hi, Im doing a testing for taking the previous values of dbgname and export the values to the new variable (CDUMAPDBGNAME_NEW), but it doesn't output the value when i do the echo $CDUMAPDBGNAME_NEW statement. Anyone can help me on this? #include <stdio.h> #include <string.h> main (int argc, char **argv) { …

Member Avatar for L7Sqr
0
5K
Member Avatar for moonw3ll

Just what is wrong with this simple code of mine? [CODE]#include<stdio.h> #include<string.h> #include<stdlib.h> main() { int i=0, num; char a[8]; char keyword[8]; system("cls"); while(i<8) { num = rand()%3; if ( num == 0 ) a[i] = 65 + rand()%26; /* 65 is the ascii value of A */ else if …

Member Avatar for moonw3ll
0
236
Member Avatar for Ararat

is it possible to make scanf not go into a newline after printf? [CODE]#include <stdio.h> #include <conio.h> int main(){ int a; scanf("%d",&a); printf ("%d",a); getch(); }[/CODE] output(suppose a is 5) :[CODE]5 5[/CODE] i want to print them in the same line like this [CODE]5 5[/CODE] how do i do that?

Member Avatar for DJSAN10
0
8K
Member Avatar for shanki himanshu

In a program i have to calculate pow(2,N) where 0<N<=1000. which data type is suitable for this? I have used unsigned long long int but its range is also limited.

Member Avatar for subith86
0
126
Member Avatar for mrnobody

Hi, I've been searching the net to try to find solution but i still can't find it despite searching it for hours. I've got a user control in a form. From the user control, I plan to do 2 things. 1) In the parent form, i got function example FunctionX(). …

Member Avatar for mrnobody
0
656
Member Avatar for shubham.joy

Hi all Please suggest an algorithm to find square root of a big number ( 100+ digits ) in C/C++.. Thank you

Member Avatar for Shardendu
0
157
Member Avatar for The 42nd

Here I am again... The question that I have is this: How do I sort an array of structures by two criteria? One element of the array looks like this: [CODE]struct record{ char name[32]; double value;};[/CODE] The goal would be to sort the array by name and if the name …

Member Avatar for Narue
0
2K
Member Avatar for sameerge

hi guys Can anyone write a C++ program for me which convert military time to standard time without using return function. write a simple program which start from #include<iostream.h> #include<coino.h> void main() { . . . . . . . getch(); }

Member Avatar for Narue
0
1K
Member Avatar for Haritha91

Hey friends, I want to compile a C program using Command prompt. I have the turbo C compiler. Please show me the way with a simple example.

Member Avatar for Narue
0
119
Member Avatar for gourav1

hi. i want to print all the possible combinations of a string entered. for example:- string input is "abc"... then output is "abc bac acb bca cba cab" and it must be true for every length of string.. i have tried many times and applied as much logics i can. …

Member Avatar for subith86
0
106
Member Avatar for Despairy

Hi i would like to build a c++ game with SFML graphic library now i see sprites can move using floats ( sprite.move(+x,+y) ) how do i connect between the graph ( configured by a matrix ) and the graphic library? since the graphic library uses floats and set positions …

Member Avatar for Despairy
0
528
Member Avatar for ishanatmuz

I want to know how to download a file using c ? For copying a file in c I do this. [code=c] #include<stdio.h> #include<conio.h> int main() { FILE *inf, *ouf; char ch; inf = fopen ( "file1.ext" , "rb" ); ouf = fopen ( "file2.ext" , "wb" ); while( !feof …

Member Avatar for rubberman
0
300
Member Avatar for yinyue

: : [CODE]void detectFaces(IplImage *img) { /* detect faces */ CvSeq *faces = cvHaarDetectObjects( img, /* the source image */ cascade_f, /* the face classifier */ storage, /* memory buffer, created with cvMemStorage */ 1.1, 3, 0, /* special parameters, tune for your app */ cvSize(40, 40) /* minimum detection …

Member Avatar for Narue
0
210
Member Avatar for c_learner

Dear All, I'm new to C, and would appreciate your help about the below code. The purpose of the program is to multiply the elements of the array and print the result. The user enters the value for how many elements he wants to have multiplied, and then the function …

Member Avatar for c_learner
0
2K
Member Avatar for Varun Bhat

[CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> #include<time.h> void main() { int i[100]; int j[100]; int k; int m; clrscr(); printf("Enter the number of questions needed:"); scanf("%d",&m); if (m<=100); { i[100]=rand()%m; printf("%d \n",i,rand()); j[100]=rand()%m; printf("%d",j,rand()); i[100]=rand()%m; printf("%d \n",i,rand()); j[100]=rand()%m; printf("%d",j,rand()); } getch(); } [/CODE] I want to generate random numbers when I press …

Member Avatar for WaltP
0
170
Member Avatar for annonymous21

I have been working on this for some time and need some help. I have posted to another forum with no results. I figured i would try here and see if i can get some real help. I am trying to populate an array with the contents of a file …

Member Avatar for annonymous21
0
329
Member Avatar for Despairy

Hi, i have a client which reads from the socket: [CODE] for (index=0;index<SCALERS;index++) { read(my_socket,vectorScalerPointer,BUFLEN); read(my_socket,resultScalerPointer,BUFLEN); sum+= atoi(vectorScaler)*atoi(resultScaler); }[/CODE] and a server program which writes to it. [CODE] for (index=0;index<SCALERS;index++) { sprintf(ascii,"%d",(*matrixStruct)._vector[0][index]); write(fd,ascii,BUFLEN); sprintf(ascii,"%d",(*matrixStruct)._mat[atoi(whichRow)][index]); write(fd,ascii,BUFLEN); }[/CODE] now the problem is the programs are in a "race condition" usualy the server …

Member Avatar for Despairy
0
173
Member Avatar for anita_86

Hi again!And happy new year to all.Just got to attained an interview and was asked about some c questions.Would like to know what does these lines means?Can anyone tell me? [CODE]int main() { int k=printf("Hello"); return 0; exit(10); } [/CODE] I got answeres like [QUOTE]You're outputting "Hello" on the screen …

Member Avatar for anita_86
0
162
Member Avatar for khajvah

Hello people I heard, that c++ is more powerful than c and i want to learn one of them. I want to know if it is better idea to start with C or with C++ without learning C. I know a bit of C# (i can make some basic games …

Member Avatar for zeroliken
0
256
Member Avatar for wickedQuasar

I have to sort a large array of numbers wherein the numbers are random and range from 1 to 9,99,999...till the time the length of array is less than 2,00,000, all sorts work fine (i tried selection, insertion and quick sort)...but when the length of array is increased to 3,00,000 …

Member Avatar for wickedQuasar
0
402
Member Avatar for agniputra

Hi can u pls tel me how to tackle a problem like this: 1234567890123456 is the number to be loaded in db... i need to convert it to double without using atof()... if i use atof() function the number is rounded off to 1234567890123460... ??? can anyone suggest for a …

Member Avatar for dannyniu
0
756
Member Avatar for Lillylionhert

I am working on a Priority Based Scheduler which reads the process in from a file. I have it reading from file and printing to the screen. I'm trying to use strtok to tokenize a line from the process test file and store it in three different arrays. The layout …

Member Avatar for Lillylionhert
0
5K
Member Avatar for mk.hashmie

I have just started learning C language. I am finding problems in nested loops and arrays. how can i learn them?? i am really getting problem

Member Avatar for mk.hashmie
0
78
Member Avatar for jeffwang66

Hi,guys: I put 15 struct variables into a continuous memory at first by using memcpy(). And then I want to print out the element of first struct variable. The correct value is 1, but sometimes "0" is printed out. I do not know why. Can someone who is familar with …

0
77
Member Avatar for IcantC

Hi there, I am trying to compile devcpp project that contains one source file helloworld.cpp [CODE] #include <iostream> using namespace std; int main () { cout << "Hello World!"; system("PAUSE"); return 0; }[/CODE] I get this error: [ICODE] C:\Dev-Cpp\Makefile.win [Build Error] [helloworld.o] Error 1 [/ICODE] Compile log is as follows: …

0
135
Member Avatar for Majoni

When reading characters from standard input what does it mean when you are asked to sop on hitting EOF in the input?

Member Avatar for gourav1
1
365
Member Avatar for akshatha.ullur

i have an excel sheet with me. i want 2 retrieve the data in c++ .. the retrieval should be in such a way that if a content of a cell is given it should tel me the content of the parallel cell .. i'm trying out alot for this …

Member Avatar for DJSAN10
0
144
Member Avatar for permutations

Hi! I am trying to figure out a way to store all tokens of a sentence into an array except the token 'done' which is the last word of the sentence, but not part of the sentence itself (it is purely there to signify the end of the sentence). After …

Member Avatar for x_bharg
0
3K

The End.