15,551 Topics

Member Avatar for
Member Avatar for p3_tib2001

Help! Now I study about NAT (Network Address Translator), it is a new way about translate IP local to public. Ok, the point is when I want to install NAT in LINUX, i got error messages like below. I think this is about coding in nat.h. What should I do …

Member Avatar for p3_tib2001
0
170
Member Avatar for lich

Teacher gave a question today to find Base is 2 and power is 3. so that Answer should be 8. so to find that she told us to use Recursion and do it. i done it in the normal way. but when i do it in the Recursion way. one …

Member Avatar for jephthah
0
114
Member Avatar for nelledawg

Hey guys, this is a really basic question but I can't figure out how to answer it! I wrote a program for users to input product price, quantity, etc. After getting the input the program displays the quantity, price, total cost, etc., and asks if the user wants to input …

Member Avatar for Radical Edward
0
161
Member Avatar for roshini45

i know everyone hates hw help but i just need some help getting started with writing the functions. here is what i have so far: [code] /* ATM Simulator Function Source File atm.c ** ** CSC-234 (M. Hutchenreuther) John Jones ** Assignment 8 Part A Section 1 ** November 9, …

0
71
Member Avatar for savinki

I want to split a string into token depending on different delimiters. e.g. char * temp = "asfs:ggd,oper:eger,ropptujnsdn:hfhgw"; and firstly I want to split data by using "," (lets call a block). and then each block should again split using ":" and save each token's value. then finally I want …

Member Avatar for saandeep_jan
0
1K
Member Avatar for lalalu

Hi I am wondering about the syntax to convert the value in address.sin_addr.s_addr into readable ip value (ie reverse of inet_addr?). btw I do know we can just use address.sin_addr to get the ip, but i need to use s_addr to pass ip infos between clients thanks in advance

Member Avatar for jephthah
0
105
Member Avatar for siripong153

I am making a game and i want to to have multi player support. What i mean is that.... When you load from the save file, you have to write the file name right? Eg. [code] FILE *out; out = fopen("datafile.dat", "r+b"); [/code] How can you let the player choose …

Member Avatar for siripong153
0
106
Member Avatar for nagguns

HI I am facing some (lot of, actually) problems porting a legacy program from UNIX to WINDOWS... I see a lot of errors like this error LNK2001: unresolved external symbol Can some one help how to get rid of these errors.. Thanks in advance

Member Avatar for jephthah
0
267
Member Avatar for SonxQ7

here's my code [code] #include <math.h> #define M_PI 3.14159265358979323846 // Calculate Constant double constant() { const double figure = 7.9454E-18; double number = log (figure); return -10 * number ; } [/code] The value in number should be -17.099... But i get -39.379... What's the problem here?

Member Avatar for jephthah
0
221
Member Avatar for charkac

Hi, I want to know how to capture and store images using a webcam in C? I searched this many places I did not get it.If somebody knows it please tell me.

Member Avatar for jephthah
0
2K
Member Avatar for cyruski

Hello everyone, I woke up this morning with a list of unanswered calls on my mobile which was coming from my younger brother who is freshman in computer engineering. anyway he desperately needs a small coding in C [B]Project [/B] A XOX (Tic tac toe) game coded in C (very …

Member Avatar for jephthah
0
131
Member Avatar for Leil@

[B]I need a program which convert infix to prefix using stack in c[/B]

Member Avatar for jephthah
1
99
Member Avatar for Drake

Hi can anyone tell me if global variables are not liked to be used and why, and whether local variables are a preferred or not and why?? thanks if you can help

Member Avatar for jephthah
0
189
Member Avatar for awi123

the program asks to calculate the power of a number, for eg. if 2 is entered as the base and 3 is th power it should display 8.

Member Avatar for lich
0
120
Member Avatar for twgood

Here is my problem; I do not know hwere to start. I have written pswudocode before, for a currency converstion program but I am unsure if I am doing the same thing with this one. Can someone please just tell me how to start this, do like the main module, …

Member Avatar for jephthah
0
114
Member Avatar for dalaharp

hi, i have to do image read and write in Turbo C. i am very new to C. so please help me out as to how to do these operations and provide some sample code if you have any.. i have a vague idea that it can be read as …

Member Avatar for jephthah
0
3K
Member Avatar for vikram_sriram16
Member Avatar for jephthah
0
287
Member Avatar for SonxQ7

I'm trying to represent a number such as [B]1.45E-15[/B] in C... How do i do this... I know there's pow() & exp() function but i don't think they are useful here...

Member Avatar for jephthah
0
128
Member Avatar for chsarp_vijay

Hi, I am working on route maps. I want some algorithms to find out shortest path between source and destination. And also i want to know how we can represent Nodes in the Maps. Can u please help me how to find out this. Regards, Vijay Bhaskar

Member Avatar for jephthah
0
63
Member Avatar for Diode

Hello, I am trying to output simple sound through the internal computer speaker. Is there a way to output certain sounds and control the frequency of the sound as well as the time it lasts? I'm using Windows XP Pro but is there a "standard" way to do this? Thanks …

Member Avatar for jephthah
0
9K
Member Avatar for rob_xx17

Hello, I have a relatively straight through program where I collect some integer data and pass it to an external file. The problem that I have is that what I really need to do is to pass that value divided by another integer (255 to be more exact). I tried …

Member Avatar for jephthah
0
97
Member Avatar for narendharg

[code=c] /* Copyright 2001, 2002 Georges Menie (<URL snipped>) This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later …

Member Avatar for jephthah
-1
820
Member Avatar for chico1st

Hi I am getting an undefined reference error from my code here is a snippet of my code. [CODE] #include <stdio.h> #include <windows.h> //defining functions void ErrorFunc(int error); int error = 0; int main(void){ return 0; } void ErrorFunc(int error) { FunctionFromALibrary(error); } [/CODE] I am using DEVC++ 5 and …

Member Avatar for lich
0
85
Member Avatar for gilly_kumar

Hi, After 7000-8000 loops, i.e after 2-3 days, there is a runtime error because malloc failed.We identified that the error was occuring malloc function tires to allocate ~250k bytes of data. Then on analysis, We listed few possible items where malloc could fail 1. Fragmentation 2. Memory overwrite or overflow …

Member Avatar for lich
0
274
Member Avatar for Crushyerbones

I'm doing a project for college. It's not too complicated but it involves a lot of data access on a linked list. Does anyone have any tips for designing an intuitive command line gui? I'm doing things like: [CODE=C] while (current !=NULL) for (i=1;i<10;i++) printf("%d *Name: %s\n",i,current->data.name); current=current->Next; switch (get_char()) …

Member Avatar for Salem
0
111
Member Avatar for siripong153

I'd make a basic C rpg game and I want to save data such as Exp, name, gold, ect. How can i do it in C? I went to c++ forum and saw it but fstream doesn't work on C. thank You

Member Avatar for jephthah
0
152
Member Avatar for yelugamraghu

How can we type cast a double number to long. I am getting wrong value, when i am trying to type cast it to long. [code=c] int main() { int s=9; double minuttakst=0.019000; int takst_enhed=60; double antal_minutter, beloeb; antal_minutter = (double) s / (double)takst_enhed; beloeb = ((double)((long)(((antal_minutter * minuttakst) * …

Member Avatar for jephthah
0
273
Member Avatar for yelugamraghu

[code=c] int main() { int antal_sekunder=9; double minuttakst=0.019000; int takst_enhed=60; double antal_minutter, beloeb, beloeb1; antal_minutter = (double)antal_sekunder / (double)takst_enhed; beloeb1 = ((antal_minutter * minuttakst) * 10000.0) + 0.5 ; //This is used for rounding up to 4 decimals. printf("\n beloeb1 = %lf", beloeb1); printf("\n (long)beloeb1 = %ld",(long) beloeb1); beloeb1 = …

Member Avatar for jephthah
0
134
Member Avatar for cebubinary

HI guys. Im a student and studying c++ that and cmd and so far i stil havent figure out how to change my current dir while my program is running. My program is that i want to make a test.txt file with a "my test file" inside it , in …

Member Avatar for Nick Evan
0
253
Member Avatar for Onixtender

I've got a question...we all know double arrays a[100][100], but how to change it into linked list or like" linked list to linked list" that we could transfer data like in a double array a[i][j]? 12345.... 2 3 . . . Ideas? Graph>weighted>minimal tree>neighborhood list(yes normally matrix, but i need …

Member Avatar for John A
0
90
Member Avatar for Onixtender

Hello, I've got a question how to change this function, because it should read f.e. two lines: 33333n5rr door 3333is closed 3333333 n5rrr [COLOR="Red"]nanana[/COLOR] tt4tt [COLOR="Red"]wall[/COLOR] t6tt6t then transform to: nrr dooris closed nrrr tt[COLOR="red"]nanana[/COLOR]tt t[COLOR="red"]wall[/COLOR]tt[COLOR="red"]wall[/COLOR]t (writing word instead of a digit was: nice ttt5555ttt //to: ttt[COLOR="red"]nice[/COLOR]ttt,deleting digits in first …

Member Avatar for Onixtender
0
142
Member Avatar for RickN

Hi all, Just a general question, if someone asks you to provide a) description of source code b) how to run the program how do you write this? I'm currently taking a C programming course as a beginner and these were ask of me to do. Any help would be …

Member Avatar for jephthah
0
127
Member Avatar for Eulerito

Hi... I saw a simmilar problem in this forum, but now i have a new problem.... I want to read string from a txt file: "myfile.txt"..... inside the file: "i want to read this text". then I write: [code=c] LRESULT CALLBACK WindowProcedure(HWND hwnd.... HDC hDC; PAINTSTRUCT Ps; HANDLE hFile; DWORD …

Member Avatar for Asat232
0
117
Member Avatar for harsh2327

Hey, I have just upgraded my C++ compiler from old [B]TurboC++[/B] to [B]CodeBlocks[/B] as per Salem's suggestion. [URL="http://www.daniweb.com/forums/post604085.html#post604085"](Check this post)[/URL] But I am finding difficult to work with this compiler for the basic reason of not knowing the in-built functions. Can you please help me with this by listing down …

Member Avatar for tesuji
0
207
Member Avatar for shaddybOi

Hello everybody, I need to implement a circular buffer and im clue less . . .HELP me:'(

Member Avatar for John A
0
118
Member Avatar for moshw

Hi, I'm learning C++ programming and have to write a program that shows how to calculate tax rates for a business tha th as shops in 3 different cities with three different tax rates, using the printf function. Anyhelp I can get is appreciated. Keep in mind I am just …

Member Avatar for Ancient Dragon
0
676
Member Avatar for cookiedianne760

[code=c] #include<stdio.h> #include<conio.h> #include<string.h> struct book{ char title[30]; int book_isbn[13]; };book library int x, found,count,y; char title[20][30]; void setup() { strcpy(title[0], "Wind In The Willows"); strcpy(title[1], "Fright Night"); strcpy(title[2], "Women From Venus, Men are from Mars"); strcpy(title[3], "Happy Days"); strcpy(title[4], "Gone Fishing"); strcpy(title[5], "My Sql"); strcpy(title[6], "About Nothing"); strcpy(title[7], "Beowulf"); …

Member Avatar for jephthah
0
119
Member Avatar for nagaa

Hi, pls help me to understand the fork process and execlp command.. With one perfect small example is ok. for me.. I can abe to understand theoritically buit i can't able to proceed through practically.. Pls no the needful..

Member Avatar for Salem
0
74
Member Avatar for nnobakht

hey guys, im have written a code that all it does is get user input and run a simple fork task. the problem i am running is the commands i type for example /bin/ls and so on does nothin it jsut asks for the next input. Could someone give me …

Member Avatar for Luckychap
-1
692
Member Avatar for Prabakar

I happened to try find the total number of ways a horse can cover all 64 squares in a chess board without visiting a square more than once starting from one corner. All I was able to do was to use a brute force algorithm which run for a whole …

Member Avatar for Prabakar
0
188
Member Avatar for riahc3

Hey everyone. Glad to become part of this community and I hope I continue to come here for a long time seeing as this site gives great helps. My problem: I have a struct that is (for example) the following: [code] #define NUM 999 struct client { int id; char …

Member Avatar for Clockowl
0
181
Member Avatar for Aleczz

I have a debug assertion failed problem with akrip code. That code is downloadable from [url]http://akrip.sourceforge.net/simple.c[/url] I have add a new code to function RipAudio(...) where i want to add new folder and name the file to it. [code] void RipAudio( HCDROM hCD, DWORD dwStart, DWORD dwLen, int song ) …

Member Avatar for Aleczz
0
314
Member Avatar for toolbox03
Member Avatar for jephthah
0
232
Member Avatar for virtual_friend

[[U]I][B]My Doubly linked list doesnt work when i try to display using backward/reverse traversal... Will you please help me....[/B][/I][/U] [IMG]http://www.withfriendship.com/user/images/616/1vijay.jpg[/IMG]

Member Avatar for mitrmkar
0
76
Member Avatar for Google Spider

Hi, [URL="http://www.webinmind.net/bpc.html#two"][U][COLOR="Red"]Someone told me to use this code to clear the input buffer..[/COLOR][/U] [/URL] [code]while((ch=getchar())!='\n' && ch !=EOF);[/code] But I fail to understand how it actually works. For example, there are two newline characters in the buffer [quote] [B][U]This is my buffer[/U][/B] \n \n [/quote] Now getchar() grabs the first …

Member Avatar for Narue
0
129
Member Avatar for ohhmygod

[CODE=c] #include <stdio.h> #define M 21 #define N 2 #define INPUTFILE "C:\\Documents and Settings\\Duy Anh Bui\\My Documents\\Uni Stuff\\Eng Computing\\Sourcecodes\\Exercise 2\\in.dat" #define ARRAYFILE "C:\\Documents and Settings\\Duy Anh Bui\\My Documents\\Uni Stuff\\Eng Computing\\Sourcecodes\\Exercise 2\\array.dat" float Quadratic(float,float,float); //Quadratic Function Prototype int main () // Start main() { float a[M][N] = {0}; // Array a …

Member Avatar for Ancient Dragon
0
193
Member Avatar for n.aggel

hi guys, it's been a while since i used c for anything so here goes a question tha may seem silly. I have 2 variable length arrays.... [code=c] int main() { int n = 5; int m = 6; int before[n][m]; int after[n][m]; array_function( 5, 6, before, after ); } …

Member Avatar for n.aggel
0
379
Member Avatar for l1985

Hi there I'm having a problem with gcc The code compiles just fine ,but it doesn't run I have a printf next to main but it doesn't even do that The code is supposed to be an http server ,implemented using Berkeley sockets ,but that doesn't really i just want …

Member Avatar for Salem
1
102
Member Avatar for kashi_787

I want to read file in binary mode using fread() into structure members. following is the code which works perfectly on Turbo C compiler(DOS base) but doesn't work for VC++ 6, it is giving exception at fread() statement. The input to this file we can give any .bmp file name …

Member Avatar for jephthah
0
144
Member Avatar for chazzquire

Hello, I'm trying to use getch several times in my program, but it is remembering earlier key presses. Is there a function or command I can use to clear the getch buffer? Or am is there something else I am doing wrong? Thank you. C.

Member Avatar for chazzquire
0
159

The End.