19,876 Topics
![]() | |
i designed this tic tac code in c bt there is sum prblm wid the part where program has to decide the winner it dosent seem 2 workin im posting the code any help is greatly supported #include<stdio.h> #include<conio.h> void main () { int go=0; int i =0; int player; … | |
hay dear i need help for c prog... i used <textcolor (14+128) ,cprint> commands to blink some text. befor i drow rectanngel and some circle as back image. but the text is not apper. if i closed the graphic mood, then it'll show. but i need kept the graphic back … | |
You are to implement a very simple distributed text editor. For this purpose, each user must be provided with a simple workspace where she can either read or write plain text. You must implement the system in such a way that, at any given point of time, only one user … | |
I need help. How do you encrypt multiple lines of a text file? /********************* *Made by Jase Inc * *Made in 10/22/2008 * *Boolean Cryptography* *Using ^ operator * *********************/ #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("text.txt"); char key[65]="jaf#$%skl%#ajlf^%dlkfhasjlk@#dsgsfsfrtw"; … | |
I have a homework assignment for a c class I am in currently, the assignment is to write a simple spell checker. I am having a bit of trouble understanding how to write a trie in c. A trie would be composed of nodes, which contain the following I believe: … | |
hi there guys!!!! Could u plz help me with this program. I hav done quite a lot but there still are some problems. here is a brief overview of ma project The aim of this project is to design and develop a useful utility program, named duplicates, to locate and … | |
Hello all I have been learning C for about 3 - 4 weeks now and I'm in need of some help. I am trying to write a function that will give you the sum of selected integers in an array with a value of 20. I can make it give … | |
I want aprogram to enroll my school time table... i have five days of school with six hour each day .,..please help me out to solve with swtich statement.,,,. | |
I will give a simple example inspired from my problem : void change(int *x, int *y){x=y;} int main(){ int *xx,*yy; yy = (int*)malloc(sizeof(int)); change(xx,yy); if(xx == NULL)printf("is null\n"); else printf("---- %d ----\n",*xx); .................................................. ......... xx doesn't point to the value of yy (*yy) , the program prints "is null" . … | |
Hi Everyone, This is my first post and I hope I followed all the guidelines correctly. This is an assignment for a class. I am supposed to read integers from a file, enqueue or dequeue them and then write them out to another file. The main method calls this Work … | |
Hey all, I'm trying to use a 3 element array and keep it sorted. So when i get a new value that should be put at the start of the array, I shift values down in the array like this: [CODE]array[2] = array[1]; array[3] = array[2]; array[1] = result;[/CODE] However, … | |
Hi I'm trying to generate a random number betwen any numbers (eg from 1 to 100) and I've tried this code: [CODE=c]#include<stdio.h> #include<math.h> #include<time.h> #include <stdlib.h> int NumAleatori(int max) { int num; num=((int)ceil(((double)rand()/RAND_MAX)*(max+1)))%(max+1); return num; } void main () { int N,a; srand( (unsigned)time( NULL ) ); printf(“Enter an integer:\”); … | |
I am having a problem with this project I am working on. The assignment is to create an application that will give a user the choice of displaying the roman numeral equivalence of a number between 1 and 10 or displaying a count of roman numerals from 1 to 10. … | |
void function(int a, int b, int c){ char buffer1[5]; char buffer2[10]; int *r; r = buffer1 + 12; (*r) += 8; } int main(){ int x = 0; function(1,2,3); x = 1; printf("x = %d\n", x); } Hi, I am new to this community and have joined recently. I am … | |
I`m working on c program which is working in graphical mode. I use Turbo C 3.0 IDE. Until recently everything was ok, but then i gave my laptop away to the service. So I temporary borrowed one and problems apeared. Before starting the work I had to install Windows XP … | |
Im trying to write a program to count characters and words when type a sentence but i keep getting "syntax error : missing ';' before 'type'" as an error. Anyone see where I'm going wrong? Thanks [CODE]#include <stdio.h> #include <ctype.h> int found_word(void); int main() { int c, nw=0, nc=0; printf("Enter … | |
Hi there again :) Could someone tell me what is the difference between function declare in main() and outside main() ? Because I don't see anything wrong. Thanks so much in advance. Here is example, [CODE=c] #include <stdio.h> //void fun(int x,int y, int z); int main() { void fun(int x,int … | |
i have searched the internet, but no result | |
Hi All, Thanks for all your help and suggestions...I am re-posting my code, with proper formatting for your review. The code runs correctly, but the ending balance, after all the withdrawals, is incorrect and I can't find where I messed up. Any help would be most appreciated: [code] #include <stdio.h> … | |
I wrote the following function and it is working fine, but my problem is i want to write forward pointer address in present pointer field. I will explain in code. please check line numbers 10, 11, 12, 13 in the following code.. [code=c] void create_fbeCodeDat() { int checkSum=0; fwrite(&signature,1, 4, … | |
Hi, I was practicing for our hands on exams tomorrow when I encountered a problem in my code. Here is a part of my code: [CODE]void interactive(){ //if argument is 0, program will enter the interactive mode. int choice; int year, month, day; char div[40]; char tags[WORD_COUNT]; char entry[WORD_COUNT]; printf("\t\t....................................................\n"); … | |
So I was trying to make a calender that outputs what ever month is prompted. yet this wont run, i keep getting this error 1>c:\users\lukas shininger\documents\visual studio 2008\projects\calender2\calender2\calender.cpp(151) : error C2059: syntax error : '}' [code] #include <iostream> #include <string> using namespace std; int main(){ int month,dateCount,dayCount,blankCount,totalDates,i; /*month: userinput variable … | |
Hey i have a home work TSR program anyone can help me >> Write a progam TSR use C to turn off sound of all aplication on computer. >> If have Sound turn off it nice if u can write code THk | |
Dear one, I'm in need of to print "Hello World without using semicolon in C"...Itz so urgent...expecting the answers by 2day soon,.. Thq | |
Hi.. May i have codings 2 display numbers 1 to 100 without using any loop.. Otherwise without using for loop alone... Thq | |
HI this is my first post here i am using dev c++ and i had been going through windows game programming for dummies. i am now facing a problem of how to display the text ie if the user enters a name how to display it and please tell me … | |
I wrote this program for simple tax and gross pay calculation... Im not able to execute the progam...Its compiling but the screen frozes while executing.. I know there is some simple mistake in my program... could any1 pls point out the mistake.. [CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> float tax_cal(float gross_pay); float … | |
I been working on this problem for so long, when I compile, it give me an error message that I misplace else at "else if (a==0 && b==0 && c!=0)" when I remove the else at that line, it mess up my code, it won't display like it suppose to … | |
Hello Team: I have users who use Reflection-X (we are on AIX 4.3)when execution our application software. If they do not "back out" of the application (... Select X on the various menu screens...) gracefully, and just "click" on the "RED X", in the upper right hand corner of the … | |
| |
i have used c++ to run windows commands in windows\system32. i am sure u r all very farmiliar with that. however, the procedure seems not to be able to access other .exe files in other folders on my machine. please advice.;) | |
I have this code [CODE]#include <stdio.h> int addthree(int x); int main() { int num; int d = 0; printf("enter ur num"); scanf("%d", &num); d = addthree(num); return 0; } int addthree(int x) { int s = 0; s = x +3; return s; } [/CODE] Okey I want this code … | |
anyone kno any simple example of the quick sort merge sort and shell sort? i cant come across any in C. | |
So I need to create a set of data points for the function v*t+.5at(squared). The data points need to be every .02 seconds from 0 to 2.0 seconds. How do I set up the counter for that? Also, all of these points need to be wrote to a location so … | |
what is meant by "divide and conquer in programing? can anyone give any examples of this? | |
Hi, I'm trying to figure out how to scale down a jpeg image in the jpeg library. From the documentation, i've come across these two variables "int scale_num, scale_denom". I've changed the value of scale_denom to 8 but my image could not be displayed. In my jdapimin.c, cinfo->scale_num = 1; … | |
I have a program to write that can binarize a gray-level image based on the assumption that the image has a bimodal histogram. The code should report both the binarized image and the optimal threshold value. Assume that foreground takes a value of 1 and the background a value of … | |
Hello, I have one application that reads and writes from the serial port. Sometimes the function read(): "read(fd,buffer,numbytes)" returns before than read bytes reachs numbytes. (Because there are more data in the serial port buffer) I mean. if numbytes is 32, sometimes read returns 12, and in the next read … | |
I'm writing a program wich is using an array -> startpoint[4] this array will be later filled by values from an other array. this is not the problem! the problem begins here: I have a class: computerPlayer.cpp with a method: getStartpoint() [code=cpp] int *startPoint[4]; // global variable int* computerPlayer::getStartpoint(){ int … | |
hello, I'm trying to import data from external file (it's a text file with fractions separated by space) and manipulate that data as a floating point. I've tried using 'fget' and 'getstring' and 'readline' and I'm getting an error that says that I'm trying to make a data out of … | |
Hi there people i have a problem i have been asked to Accept characters from a data file. Convert all the characters to upper case,Save the characters to a new data file which i have done. But for some reason im stuck on trying to get the following to work: … | |
I have searched many a site to find an answer to this question, so here goes: I'm doing a hangman program that needs to pull different quotes from a text file named quotes.txt. Each quote is on a different line. I have the entire hangman program written (I can post … | |
Hello there! How can I convert an INT value into a string? I used the itoa function successfully in Windows: [code=c]itoa(the_int_number, the_string, 10);[/code] It worked fine in Windows (DevC++) but Linux did not recognize this function. Does anyone know another way of converting INT into char[n] in C that Linux … | |
Hi, I am trying to finish this small project of mine but I can't seem to solve the problem for a few days already. Its about an simple application on messaging and reading message between 2 phones but when I am doing it it doesn't seems to be too simple.:p … | |
can't figure out what I'm doing wrong....Im trying to write a program that can convert a sequence of positive integers from base-10 (decimal) to base-2 (binary), but I can't use the pow function [code] #include <stdio.h> #include <stdlib.h> void input_check (int start, int stop) { if (( 0 <= start) … | |
[url]http://www.sendspace.com/file/do7486[/url] Can someone please explain the assignment & give me some hints. The way am thinking to do is like this.. enter ur input: 1024 i take 1024 and do a loop, divide it by 8 until the number is less then 8. when its less then 8. thats power3: … | |
hi there people i was hoping i could get some help please as im kinda stuck. ive have been asked for my uni portfolio to "accept the characters from a data file rather than from the keyboard. Extend the program to convert all the characters to upper case (excluding numeric … | |
I wrote the following function. i want to return fbCodeAddr and tmpAddr to the main function. How to do this? Function is as follows; [code=c] void fbExeCode(int BldCnt) { // for(int BldCnt=0;BldCnt<fbdStepno; BldCnt++) { char *fbCodeAddr; char *tmpAddr=0; char *buffer; int n; fbCodeAddr=(char *)malloc(1024); int stack=0; int totalPin=0; for(int fb=0;fb<fbnodeLst.size();fb++) … | |
how can this be done? do i have to pointer the database in the structure first to make it able to be use from a text file for some C program ..example.. a measurement converter?? | |
I am trying to convert an int, a char, and a short into their binary values and display it. int a; char b; short c; I understand how to convert an integer to a binary value bit by bit, I just don't understand how to store it as a varible … |
The End.