19,876 Topics

Member Avatar for
Member Avatar for cruisx

Hi guys, have a school project that i am working on but i am just running into this one problem. Well its not really a problem its more of a me just starting the c++ course and i just wanted to do something extra to get some more marks. We …

Member Avatar for computercobra
0
832
Member Avatar for bobrien314

I have this assignment to write my own malloc program and I am having some trouble. I am using a doubly linked list to manage free space and used space, and using next fit to allocate the memory. the problem that i am writing about is when i return the …

Member Avatar for nucleon
0
107
Member Avatar for PCli

I tried a code like this [CODE] #include <stdio.h> int main() { enum a { b, c, d, e,}f; printf("The stack top is near %p\n", &(f = e) ); return f; }[/CODE] and got message : error: lvalue required as unary ‘&’ operand I use gcc4.3.2. and I had tried …

Member Avatar for PCli
0
110
Member Avatar for shevy24

hello, can somebody tell me where i can download a free c++ video tutorial.....i really need it badly

Member Avatar for Spanki
0
213
Member Avatar for deepakps

// author :: DEEPAK PS // AMRITA UNIVERSITY,AMRITAPURI //BSC CS [code=c] #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int left, top, right, bottom,i; // char s[20]="Done By DEEPAK.."; /* initialize graphics and local variables */ …

Member Avatar for ithelp
0
118
Member Avatar for yuvaraj.tr

Hi i am new I have two c prgorams as yuva.c & raj.c For this how i create make file please help me Thanks Yuvaraj R

Member Avatar for Ancient Dragon
0
80
Member Avatar for miniroselit

whether there is c program implimentation forthe stable marriage problem? How can I extend this problem in a real life situation?

Member Avatar for ArkM
0
99
Member Avatar for Hiroshe

I just wrote a simple function to convert a number with any base into a base 10 number: [CODE=c]#include <stdio.h> #include <math.h> #include <string.h> int tobase10(int *input, int size, int base); int main() { int input[256] = {2, 2, 1, 0}; printf("%d\n", tobase10(input, 4, 3)); printf("Press any key to continue …

Member Avatar for Hiroshe
0
171
Member Avatar for belac_88

[Newbie here] Need to write a simple declaration program w/c apply the substitution method. substitution table is: *-a $-e /-i +-o --u sample outputs ENCRYPTED MESSAGE: m$$t m$ *t 9:00*m /n th$ p*rk DECRYPTED MESSAGE should be: meet me at 9:00am in the park MY PROGRAM: [#include<stdio.h> main() { char …

Member Avatar for Narue
0
74
Member Avatar for sarawilliam

i am able to read the nice.ls FILE. Let me explain u my nice.ls FILE content 1st column is integers dont bother abt them, 2nd column is address, i read it by using isxdigit array[6] and i am able to read the hexadecimal 3rd column is opcode , i am …

Member Avatar for nucleon
0
143
Member Avatar for bussaina

what is the output for program below [code=c] int a = 5; int A = 8; A = 9; a = 7; printf ("%d%d", aA); [/code]

Member Avatar for Dewey1040
0
75
Member Avatar for billgone

Can anyone please help me make a program that does following: i enter first string then i enter the second string i.e. first string: "abcxyzefg" second string:"xyze" and the program should the write a new string without the second string in the first one i.e "abcfg" thank you

Member Avatar for Mazzin
0
81
Member Avatar for krutthika

Hello, C program for audio compression and decompression? Please help .. I need the source code... Thanku

Member Avatar for monkey_king
0
102
Member Avatar for sarawilliam

Hi check my program i have used to read a FILE( nice.ls is shown below the program). I am able to read the FILE nice.ls, but i also have to check whether it starts with interger and next i have to check the hexadecimal if no hexadecimal then it should …

Member Avatar for sarawilliam
0
924
Member Avatar for gsingh2011

Hi, I'm getting a warning when compiling the following code: [CODE]void printstr(unsigned char *string, volatile unsigned char *videoram) // Print a string { int i = 0; while(string[i] != '\0') { videoram[2*i] = string[i]; videoram[1+(2*i)] = 0x07; i++; } } unsigned char *memset(unsigned char *dest, unsigned char val, int count) …

Member Avatar for nucleon
0
422
Member Avatar for s_sridhar

Hi guys, I'm from India, I'm doing my first year IT. We have been asked to submit a mini project, so i was trying to develop a keylogger using c, but my keylogger senses keys only within the editor and the output screen, is it possible to do that using …

Member Avatar for Luckychap
0
167
Member Avatar for BlackIris

Sorry if this is in the wrong section but I wasn't really sure where else. I'm trying to use gcc and -S option in order to produce assembly file. Now, if I do not use -S, I can compile it fine and run it. But once I do use -S, …

Member Avatar for Aia
0
94
Member Avatar for mastermosley

I'm working with Network stream and building a small telnet server, I have two questions: 1) How to implement a backspace, when connected via telnet when it backspaces it doesn't delete the character but just moves the cursor back and overwrites it when you type another character. I've noticed that …

0
64
Member Avatar for Alerwi

Hi guys , i am new to C and i am looking for help basically ,i have this subjeCode[][9]={"UMA 1162","UMB 1052","BSM 1913","BDA 1602","BEE 1113","BEE 1122","UMB 1011","\0"}; and i want the user to enter the code then the program checks whether or not it is there!! so Please can any one …

Member Avatar for Narue
0
72
Member Avatar for Hiroshe

Here's the deal. I have two arrays. One defining a character set(could be any length), and another defining a string. I want to switch every letter in the string with its placement on the character set. For example: chrset[256] = "abcdefg" string[256] = "gfdc" will turn into: chrset[256] = "abcdefg" …

Member Avatar for Hiroshe
0
101
Member Avatar for mastermosley

I'm building a telnet server and I need a type of arraylist. I need this arraylist to contain an index 0 - 100 thats how many connections I allow at once, and an Ip address so when I refer to index 0 it will give me the ipaddress. I'm new …

Member Avatar for mastermosley
0
84
Member Avatar for Hiroshe

Just getting back into c (I've been dosing assembly for the last few months), so don't laugh at me :S I'm trying to read an input file. The fist line contains how many lines to read. The rest of the lines contain 3 words. Here's an example: [CODE]3 Hello, World …

Member Avatar for kenji
0
105
Member Avatar for nitu_thakkar

i have to make one prg in c that accept only odd number (no) which is (4>no>30) & have to genrate the pertern which is given below when no=7 then given petern should be genrated for that i have do some coding but i can't get the exatly petern.. pls …

Member Avatar for nitu_thakkar
0
163
Member Avatar for mrtsoftware

hello everyone,I must solve a problem which effect my c programming lesson grade...Here is the problem: Write a program to convert a time given seconds to hours,minutes and seconds format. Sample Run: Enter seconds: 8230 It is 2 hours, 17 minutes ,10 seconds… We learned only #include<stdio.h> not iostream or …

Member Avatar for mrtsoftware
0
96
Member Avatar for bluebird

Hello! I am trying to write a program that test whether a word is present in a file or not using command line argument. Here is my program. It does not work properly. Although the word I entered is present in the file, it has been saying that " the …

Member Avatar for nucleon
0
93
Member Avatar for bluebird

Hello I am writing a file program like that user has to input a string and that string was written to a file. From that file, that string was read to the another file changing lower case letters to upper case letters and upper case letters to lower case letters. …

Member Avatar for nucleon
0
117
Member Avatar for senidaljeet

Hi there, My friend has got vista in his laptop , now when he tries to run a Graphics program in TurboC it doesnt show the output ( there's no coding problem, BGI header files all are ok) So i gave him Turboc 4.5 , now this TC hasnt got …

Member Avatar for ArkM
0
85
Member Avatar for nexocentric

I was making a dos based text game and needed user input. I looked through the forums and found the thread on safe user input, which would be using fgets() instead of gets(). The first problem I ran into was that stdin always had '\n' in the buffer, so it …

Member Avatar for Ancient Dragon
0
495
Member Avatar for gsingh2011

I had some code that worked fine, but then I decided to put it in a header file and now its not working. This is my first time using my own header files so I'm assuming I made a beginner mistake somewhere... [CODE]/* kernel.c */ #define SCRWIDTH 200 #define SCRHEIGHT …

Member Avatar for ArkM
0
92
Member Avatar for aagomez

I am currently having problems updating a public data member that is a vector of pointers. I have a class called node, that has a public data member called list. list is [icode]std::vector< node<T>*>[/icode] and should contain pointers to other [icode]node<T>[/icode] objects. I am trying to overload the assignment operator, …

0
57
Member Avatar for dubster

hi guys im new to the site im from south africa...im currently in my second year of electrical engineering and now my college has forced me to do software design and ive never had any experience with programing and the others have cause they had programming 1...so my problem now …

Member Avatar for tux4life
0
106
Member Avatar for RexxX

What way(s) can I reread the same file in C? I've only been able to find C++ tutorials. I tried: [code] fclose(infile); infile = fopen(argv[1], "r"); //error checking [/code] but this code didn't go to the beginning of the file.

Member Avatar for kenji
0
90
Member Avatar for bluebird

hello Is there any way to change numeric to figures? for example if the user input is 134, the program output must be one three four. thanks in advance, Bluebird

Member Avatar for rajenpandit
0
119
Member Avatar for snap!

Ok, so im having trouble with this program and dunno where to start, or end. if anyone is bored and can help out would be great. 1. The regular rate for a call is $0.10 per minute 2. Any call started at or after 6:00pm (1800 hours) but before 8:00 …

Member Avatar for StuXYZ
0
92
Member Avatar for nuclph

Hi all, Suppose, I have the following classes B, D1 and D2 as defined below. Also, I have function test which have only pointer to the base class and say key which will tell D1 or D2 to create. void test(B *b, const std::string &key) { ... } I would …

Member Avatar for nucleon
0
80
Member Avatar for ~s.o.s~

Hello to alll programmers out there. Here i am trying to design a custom pascal triangle where the user can specify the TOP ELEMENT as well as both the CORNER elements. The problem i am facing is that the prog works well till the 3rd row but starts giving rubbish …

Member Avatar for creeping death
0
726
Member Avatar for ITech

hi, i have a table with customer information(name, date of birth etc) i have created a windows form in c# and binded it with the database. the thing i want is retrieve the DOB from database and calculate the customers current age n display in a label in the form;; …

Member Avatar for ddanbe
0
106
Member Avatar for jenilgandhi
Member Avatar for Dewey1040

I'm trying to complete a radix sort program, and i cant remember the algorithm to get the specific digit out of a number between 1 and 10000 heres the for loop which calls getdigit: [code=C] for( i = 0; i <= 4; i++ ){ printf("Pass %d: ", i ); for( …

Member Avatar for monkey_king
0
111
Member Avatar for s1986

connect() system call fails while client tries to connect to a server givin duplicate name error.Can you please suggest me a way to remove this error? Also I would like to know can we check if a socket is closed or not? how to ensure that a socket is closed. …

Member Avatar for monkey_king
0
102
Member Avatar for yuvaraj.tr

Hi I have doubt . Can we return the some data from boolean Function in C For Example [code=c] bool add( int a, int b) { int C; C = a + b; return C; } [/code] Is it possible in C

Member Avatar for monkey_king
0
130
Member Avatar for death_oclock

My program is getting hung up somewhere in the function [ICODE]evolveRealization[/ICODE] and while it is stuck its memory usage is increasing by around 1MB per second! While it is building up generations, it was designed to only use the most recent one, and the old ones should be freed. So …

Member Avatar for Ancient Dragon
0
151
Member Avatar for danielle23

I am working on finished up a program using stacks. I am getting some funky errors when I attempt to rebuild&compile, so I am certain something in the code is not right. [B]Program Objective[/B]: Just to brief, I am using main and a .h file with classes. I am supposed …

Member Avatar for danielle23
0
1K
Member Avatar for bharavn

I am new to Turbo C can anyone tell me how to create a project of muLtiple .c and .h files in Turbo C, and also how do you combine all the files at once?

Member Avatar for ArkM
0
114
Member Avatar for Max721

Hi all. Is there any way to extend maximum timer count value above 0x7fffffff i.e. 24.8 days? [code] #include<windows.h> #include<stdio.h> VOID CALLBACK TimerProc( HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime ); void main() { UINT time MSG msg; ::SetTimer(NULL,0,time,TimerProc); GetMessage(&msg,NULL,0,0); } VOID CALLBACK TimerProc( HWND hwnd, UINT uMsg, UINT_PTR …

Member Avatar for nucleon
0
103
Member Avatar for AlSal

I have the following C++ code: [code=syntax] void f(int* x) {...} void f(char* x) {...} int main() { ... f(0); ... } [/code] I understand that this has a problem interpreting which function to call. I also think I can get rid of this problem by giving it two different …

Member Avatar for Narue
0
103
Member Avatar for stickboy

Hello I know I may receive some grief for not inserting code correctly it is my first post... My question is this: I am reading a huge list of values from a file and I need to store these elevations into an array so they can be used to calculate …

Member Avatar for stickboy
0
265
Member Avatar for Sallad

Hello, my name is Dallas. I'm (obviously) new to the site. I've spent the past couple of days doing absolutely nothing but trying to work on this program. I usually don't like trying to get help, but I've spent so much time on it by myself that I have no …

Member Avatar for DemonGal711
0
3K
Member Avatar for amerninja2

So I'm working on a program "Master Directory Control", it gets all the information about all files in a directory (name, location, size, exists, etc.) and puts them into ListBoxes. That all works fine. There's a feature where you right click on selected file in the Name ListBox, and you …

Member Avatar for amerninja2
0
249
Member Avatar for moonw3ll

[code] #include <stdio.h> #include <string.h> #include <conio.h> #define MAX 17 #define TAX_RATE 0.12 #define LENGTH 30 struct menuItemType { char menuItem[LENGTH]; float menuPrice; int numOrdered; }theMenu[MAX]; void Menu(void); int getData(int); void overView(void); void initialize(void); int order(void); float pbill=0; float bill=0; float totalTax=0; int main(void) { int choice=0; char end; initialize(); …

Member Avatar for moonw3ll
0
156

The End.