19,876 Topics

Member Avatar for
Member Avatar for ContactaCall

how would this be done [CODE]int main(void) { char string[]="231 number 73 word 1 2"; char *ele; ele=strtok(string," "); while (ele != NULL) { if (*ele == '0' || *ele == '1' || *ele == '2' || *ele == '3' || *ele == '4' || *ele == '5' || *ele …

Member Avatar for ContactaCall
0
250
Member Avatar for ContactaCall

So I'm using Mysql to make a text-to-speech engine. Basically any given phrase by the database is returned to my script, which has to say every word and number, if any, by way of voice . For the voices I'm using Asterisk, but that's another problem of my own lol …

Member Avatar for Dave Sinkula
0
418
Member Avatar for johndoe444

hi, 1) what q signify and how can it be of any use? int* p = 0; int* &q = *p; 2) what does it do? int main() { return main; } It compiles with gcc (not g++) and running the executable does not do anything without error. Thanks.

Member Avatar for gerard4143
0
96
Member Avatar for mindbender

I have to create a random matrix m*n where m and n are user inputs. Now i have to fill the matrix with random nos. Finally I must have a matrix where each value is either 0 , 1 , a fraction no between 0 and 1, and also sum …

Member Avatar for Nick Evan
1
5K
Member Avatar for Tunernetwork

I was told to ask my question here, so bare with me as I am new here! C+ code and vbulletin question I hope this is the appropiate place if not I apologize now and move if need be. I need help on this. I am workin on a site …

Member Avatar for sknake
0
145
Member Avatar for Monina

i have to sort an array of integers using bucket sort. i kind of made it but there is still a problem. before i make the sort i have to verify if there is one or many numbers which begins with one or many zeros.if there are this kind of …

Member Avatar for Monina
0
109
Member Avatar for phil750

Say i have an [code] int c =8; [/code] and i want to do a fork to say do a printf [code] printf("hello im number blah blah"); [/code] is there a way to do that printf as many times as whatever c is equal too? using a fork(). maybe something …

Member Avatar for gerard4143
0
82
Member Avatar for ankur_

In Suse I have got 2 libs which I have to use to link with my source files but they are interdependent on each other. Means if the 2 libs are A and B than A is dependent on B and B is dependent on A In that case what …

Member Avatar for Salem
0
145
Member Avatar for vegaseat

Convert a decimal (denary) integer to a binary string. An exercise in do ... while and while loops.

Member Avatar for arun26
2
2K
Member Avatar for ahmed supari

i am a beginner to the c language recently i`ve come across the expression - *s++ == *t++ what does this expression means??

Member Avatar for Narue
0
173
Member Avatar for piyushsol

in this code i did matrix multiplication 1. it accepts size of the matrix 1 . 2 . i used functions for enter matrix from user and print it. problem is that....it is printing garbage elements...[code]#include<stdio.h> #include<conio.h> void mx_enter(long int **arg,long int a,long int b) { long int i,j; arg=(int …

Member Avatar for kvprajapati
-4
92
Member Avatar for BoB3R

Hello, I've got problem with loop for and EOF in it. I want to write every thing from a file on screen it work with one line but i want to read all lines here is the code: [CODE]#include<stdio.h> #include<stdlib.h> #include<string.h> int main () { int i,j,k,l,o,liczba,tab1[4]; FILE *f = …

Member Avatar for kvprajapati
0
172
Member Avatar for hnf1991

I want to make a program that only takes integer. and if someone write any alphabet, then it will ask again for that number. For Example: Enter Age:as Invalid Number Enter Age:

Member Avatar for Dave Sinkula
0
88
Member Avatar for Donnovan

hey guys, i'm trying to acces the the member of my person structure, can someone help me, what am i doing wrong are what am i forgetting [CODE]#include <stdio.h> #include <stdlib.h> typedef struct { char *vnaam; char *anaam; int leeftijd; } persoon; persoon *q, p1; //char antwoord2b[128]; void drukaf(persoon p){ …

Member Avatar for Donnovan
0
111
Member Avatar for balajisankar

[CODE]#include<stdio.h> #include<conio.h> void main() {int a[10],i=0,c=0,n; printf("\n enter the gray code"); scanf("%d",&n); while(n!=0) {a[i]=n%10; n/=10; i++; c++; } for(i=c-1;i>=0;i--) { if(a[i]==1) { if(a[i-1]==1) a[i-1]=0; else a[i-1]=1; } } printf("\n the binary code is"); for(i=c-1;i>=0;i--) printf("%d",a[i]); getch(); }[/CODE] this is for converting binary code to gray code[CODE]#include<stdio.h> #include<conio.h> void main() {int …

Member Avatar for WaltP
-3
122
Member Avatar for Creator00

Hello, I need to write the recursive algorithm of type divide and conquer. The input is integer array S. The output is true if the array is sorted or false if not. Algorithm should divide the array in two halves, then to check the sorting of both halves with the …

Member Avatar for xavier666
0
58
Member Avatar for imolorhe
Member Avatar for xavier666
0
177
Member Avatar for isrinc

Newbie with problem reading 6-column floating point data. I copied an example and expanded for my use, but get this output in OutFileOne.txt: 0.000 0.000 0.00 0.000 0.000 0.00 Not getting correct values, nor correct # of values in columns. Any suggestions? Have tried explicit format (%5.2f) with no luck. …

Member Avatar for isrinc
0
1K
Member Avatar for mapla

[code] #include <stdio.h> main() { int number; int ch; char sh[100]; int i=0,j=0; printf("input No in Hex: "); scanf("%s",&sh); number = 0; i =strlen(sh); j=0; while(i!=0) { ch = sh[j]; printf("Ch:%d\t%d\t%d\n",ch,'7',ch-'7'); if(('0' <= ch && ch <= '9')) { number = number * 16; printf("Number :%d\n",number); number = number + …

Member Avatar for prushik
-2
163
Member Avatar for deepin

[code=c] while(1){//return from the loop only when the input is zero printf("\n1: Stack1\n2: Stack2\n0: to return\n"); scanf("%d",&i); switch(i){ case 1: printf("1"); break; case 2: printf(" 2"); break; case 0: printf("Thank you for using the service"); break; default: printf("Give a Valid Option"); break; }//end of switch - case }//end of while …

Member Avatar for WaltP
0
3K
Member Avatar for phil750

So i have to build a scheduler in priority ques, which will read infomation from test files. Also the work out the wait time and finish time. Text file will be like this; process1 21 3 process2 23 1 process3 45 20 [processID][space][Quantum][space][priority] So here what i have so far, …

Member Avatar for phil750
0
101
Member Avatar for prushik

I am trying to write a TFTP server. I have successfully completed the code, it is fully RFC 1350 compliant. However, I wrote the whole thing in Haiku OS, and in Haiku, it works great. However, I also need a DHCP server, and I don't have one for Haiku. So …

Member Avatar for prushik
0
241
Member Avatar for Shillz

can anyone guide me how to run a c++ program inclusive of graphics through notepad++ by using borland compiler OR plz guide me hw to compile n run a c++ graphics prog in vista..as it's not possible by normal tcpp

Member Avatar for CppBuilder2006
0
983
Member Avatar for landonmkelsey

This code defines a new operator new in C++ such that the memory returned is in the shared memory segment rather on the heap. This code exists to prove a point. "Objectifying" shared memory. One can not overload the new operator but one can overload operator new. Reference the C++ …

1
427
Member Avatar for reyarita

good day ahm guys do u have any idea how to make GUI in console application in c# I've tried searching in internet but i couldnt find it. Mostly VB. Pls guys need your help for my sales inventory system

Member Avatar for avirag
0
181
Member Avatar for johndoe444

Hi, I am implementing the linked list delete as: before delete: (delete a) ->(0x01:a)->(0x02:b)->(0x03:c)-> after delete: ->(0x01:b)->(0x03:c)-> ie instead of deleting a the content of next node is copied to current node and the next node is deleted. The code is as follows: [CODE]template<class type>void list_delete(struct _linked_list<type>** llist, type value) …

Member Avatar for johndoe444
0
116
Member Avatar for vaibhav2614

Hi everyone, I've been trying to code up a generic vector implementation in C, and the compiler has not been kind to me... Here is the struct I have defined in a file "vector.h." [CODE]typedef struct 72 { 73 int elemSize; 74 int logLength; 75 int allocLength; 76 int delta; …

Member Avatar for vaibhav2614
0
129
Member Avatar for Rajasekhar33

Hello sir, This is Rajasekhar murthy.... I want a c++ program on files i.e.., write a c++ program to eliminate blank space ,comments, tabs in a given file. I am waiting for your reply sir..........

Member Avatar for Salem
-2
73
Member Avatar for saiprasad_v

i wanted to know the procedure to find out a cycle inside a single linked list...if the last node of the list points to an of the nodes(say, the middle node) in the list, then there exists a loop in the linked list...i wanted to know the procedure to find …

Member Avatar for Salem
0
47
Member Avatar for xavier666

The program generates a calendar for one year. The program only asks for the day on which 1st January falls from user. Notes : [LIST] [*]Compiler - Turbo C++ 4.5 [*]Leap year has been considered [*]The only reason for including [icode]conio.h[/icode] is because of [icode]clrscr()[/icode]. If somebody can give me …

Member Avatar for binkiwinki
-3
375
Member Avatar for phil750

I am currently writing a basic program scheduler (just started) which we have a text file with format of Process(id) (space) (quantum) (space) (priority). I am working on the first bit of the program actually reading in the text file and am trying to assigned the process ids, quantum and …

Member Avatar for phil750
0
116
Member Avatar for iamcreasy

Im trying to solve a ACM problem 10189, LINK: [url]http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1130[/url] It looks ok to me...but, online judge is showing wrong answer... can anyone help me to figure out the problem. [CODE]#include<stdio.h> int row = 1, column = 1,i=0, j=0, a=0, b=0; char array[100][100] = {0}; int change(int a, int b) …

Member Avatar for iamcreasy
0
204
Member Avatar for asm2hex

Hello, I have a quick question I want to ask. How can I copy the data from a allocated variable, so that when I free up the allocated variable the copied data isn't erased with it. Thanks, -A2H

Member Avatar for Narue
0
105
Member Avatar for xavier666

Suppose the user wants to input a string. The length of the string is unknown. I also don't want a character array of size 1000 or what so ever. I want the size of the character array increasing by 1 byte for every character entered. Here is a sample output …

Member Avatar for Narue
0
426
Member Avatar for tien113

[CODE]#include <stdio.h> int main(int argc, const char* argv[]) { int x; loopstart: printf("enter a value : "); scanf("%d", &x); getchar(); printf("value is %d\n", x); return 0; } [/CODE] can u help me, I want x return integer number (ASCII code) when enter a character... my code is not working... thanks...

Member Avatar for WaltP
0
141
Member Avatar for Simzz

Dear all, I have a problem with binding a server socket on a mac os x 10.5.8. The problem is that every time i try to bind the socket to the address it gives the following error "Address already in use". I know that it means there is another process …

Member Avatar for gerard4143
0
439
Member Avatar for titosd

Hello, I have a program that i need to input a sentences from file and do with them some thing. I inputed it by fgets fun, and saved them at array. Now i want to cut the every sentence to words, such is: these sentences: Hello world You need to …

Member Avatar for Dave Sinkula
0
99
Member Avatar for rigidboss

Hello All, I have a requirement as follows. I am writing a software to compute invoice . The program will get the user details and it will autogenerate a INVOICE NUMBER. So in order to auto generate the INVOICE NUMBER, i tried to use file concept. I save a integer …

Member Avatar for justice igwe
0
114
Member Avatar for tinkeydo

[CODE]#include <iostream> #include <windows.h> #include <fstream> #include <string> #include <ctime> #include <vector> using namespace std; bool fileCheck(const char *filename) { ifstream ifile("item.txt"); return ifile; } int show(int p) { srand( time(NULL) ); int random_integer; random_integer = ( rand ( ) % p ) + 1; return random_integer; } int main …

Member Avatar for tinkeydo
0
397
Member Avatar for imso

I started to program on C++ on converting 8bit binary to its decimal requested for my school project. But i have problem to proceed further as i am lost on what to add on next. Can someone help me to add on to my program to allow it to work.. …

Member Avatar for Dave Sinkula
0
214
Member Avatar for ireimaima

Hi....can anyone help me to explain what is the use of isPrime=true; in the last line of this coding..?? I found that it is very important because if i delete it, the answer of the prime number will always constantly 2 and 3.. Even if i put 7 as the …

Member Avatar for ireimaima
0
123
Member Avatar for Shillz

how can we use a printf statement without a semicolon??? this was a question asked during an interview of a computer engineering student.

Member Avatar for Shillz
0
153
Member Avatar for ireimaima

Hi...there,,can anyone debugging my code.. this program intend to find the average and count how many numbers is positif and negatif from 10 numbers entered by user. My problem is when i run the program the result of average is correct but somehow on the result of negatif and positif …

Member Avatar for ireimaima
0
154
Member Avatar for sarah_laz

I have been asked to program a spellchecker in C for an assignment. I am quite new to C and programming in general, so I have decided to start by writing a program that does the following: [LIST] [*]Reads words into an array from a dictionary text file. [*]Reads words …

Member Avatar for sarah_laz
3
1K
Member Avatar for Gaiety

why we have an int type when we already have short and long ints because int means either short or long.

Member Avatar for Salem
0
154
Member Avatar for caroll

hi, please please give me exact explanation for the tilt symbol in c.... here i have paste the code and i m getting the output of 1... how it comes 1..?please explain me soon...[code]#include<stdio.h> main() { int m=1; ~~~m; printf("%x\n",m); }[/code]

Member Avatar for caroll
0
143
Member Avatar for surfer2009

i am new in c . i have made the code in C++.its working fine. the only problem i face i got error in printf statment. please tell me how can i change cout statement into printf [code] #include<iostream> #include<cmath> using namespace std; int main() { int x=0; for(int i=0;i<=6;i++) …

Member Avatar for Narue
0
95
Member Avatar for caroll

please send me tutorials to know about the operators////.. especially 1) ^,>>,$,~..etc...

Member Avatar for WaltP
-2
93
Member Avatar for silayse

hi ! I am new in c# asp.net,I have 2 user type.When Standard users submit a request ,other user type like admin can see and accept or reject.I created a request and other user see this request but I can not implement accepting or rejecting part.I can not add checkbox …

0
66
Member Avatar for surfer2009

i have just started c language and i have only study "while" and "for" "if else" please help me in this question using loops(without usuing arrays) write a program that prodeuce the following output: 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 …

Member Avatar for gerard4143
0
107

The End.