19,876 Topics

Member Avatar for
Member Avatar for shailev

hello . I have a problem. I have a variable DWORD num= 0x1234ABCD i want to convert it to char * for example- char * result[0]= '[the ASCII of 0x1]' result[1]= '[the ASCII of 0x2] result[2]='[the ASCII of 0x3] ... How can i do this?? thank you very much!

Member Avatar for Salem
0
80
Member Avatar for latszer

I am almost completely brand new to programming (been in my first programming class for about a month), and I am trying to learn stuff that my professor isn't teaching yet so that I don't get behind later, and I am doing this by writing simply programs and learning all …

Member Avatar for Narue
1
221
Member Avatar for elton571

Can some one please help me in writing a program for the INSERT AND DELETE operation on a BST, the operation functions must be NON-RECURSIVE ??

Member Avatar for Narue
-1
60
Member Avatar for Argo54325

Hello, I've been looking for information on creating a chat server and client application, just the basics that would include: 1. Connecting to the server. 2. Displaying a "friends list" (like windows live). 3. Open a private conversation with a friend on the list. 4. Send messages from users to …

Member Avatar for csmgsarma
0
168
Member Avatar for hsp700

Hi, I am trying to understand the Standard C function "getchar()". I am using CodeBlocks 8.02 in Windows XP. Please compile this code in your compiler and note how it behaves: [CODE]#include<stdio.h> int main() { int i=getchar(); while(i!=9) { printf("%d",i); i=getchar(); } printf("%d",i); return 0; }[/CODE] When I insert Tab, …

Member Avatar for hsp700
0
132
Member Avatar for DJPlayer

ok I'm taking a text file.. 16 lines.. 6 character values per line and trying to randomly get one character per each line.. and place them into a 2d array (4x4). The values i'm getting aren't correct for some reason.. anyone have any helpful tips? [CODE] int main() { srand …

Member Avatar for WaltP
0
243
Member Avatar for abhimanipal

Hi All, Today I came across a peculiar piece of code. [code] int main(int argc, char* argv[]) { printf("%lf\n",(0.99-0.90-0.09)); } [/code] According to me the output for this code should be 0, but to my surprise when I ran this code the answer that I got was -0.000. I cannot …

Member Avatar for abhimanipal
0
99
Member Avatar for tzushky

hello, Here's a simple question I want to clear up. We all know that we can use the name of an array as the pointer to that array, and that a pointer holds the address to the variable named. What I'm doing is this [CODE] //somwhere in the code uint8_t …

Member Avatar for Narue
0
3K
Member Avatar for datk0m

Hi to everyone here! I'm a newbie! I just wanna ask help from you especially from the administrator regarding my machine problem..... I am asked by my proffesor to create a slot machine program. This is how it goes... The simulation starts by presenting the player with a menu of …

Member Avatar for whgeiger
0
1K
Member Avatar for COKEDUDE

Can you please give me a list of all of the % letters that go with int, floats, and doubles in printf and scanf.

Member Avatar for COKEDUDE
0
83
Member Avatar for traced

i need help about the String codes.... its about how to delete a string.. like for example it displays like "The Dogs and Cats" the program wants the user to choose what to delete like i want to delete the Dogs.... and the result is now "The and Cats" cause …

Member Avatar for WaltP
0
106
Member Avatar for akshay91

i am getting linking errors while i try to program graphics in turbo c "unable to open file tcclass.lib"please help

Member Avatar for WaltP
-1
33
Member Avatar for DoEds

Im trying to make a program that will sort the the list according to its cost...from least to expensive... here's my code: [CODE]#include <stdio.h> #include <string.h> typedef struct resto RESTO; struct resto{ char *name; char *address; float cost; char *food; }; void output(RESTO r1); int main() { RESTO r1= {"Coras","Agora",60,"BBQ"}; …

Member Avatar for abhimanipal
0
85
Member Avatar for DJPlayer

I'm trying to convert a double w/ a string of characters w/o using sprintf and padding w/ 0's.. omg... driving me nutz.. what I have thus far.. [CODE]#include <iostream> #include <cstdlib> #include <cmath> #include <deque> using namespace std; void d2s(double,char[], unsigned int); int main() { while (true) { double num; …

Member Avatar for Dave Sinkula
0
226
Member Avatar for MatthewSedam

This is a basic calculator I made in C++. I am learning C++ on my own. [CODE] #include <iostream> using namespace std; float Add (float &a,float &b) { float c; c=a+b; return (c); } float Subtract (float &a,float &b) { float c; c=a-b; return (c); } float Divide (float &a,float …

Member Avatar for WaltP
0
179
Member Avatar for zangetsuu

i'm doing a payroll system and i have finished it but i need some eror checking reports for name and integer but i'm going to do the integer first which wll input hours of a day from monday to friday what i need is a loop along with error checking …

Member Avatar for zangetsuu
0
127
Member Avatar for Ngup

Hello C#ers, I apologize for the rudimentary question but I did not realize my issue till now. I have a large csv file some 214MB. Initially I made my program readalllines and it takes forever. I understand to fix this problem streamreader can help. However any of the tutorials I …

Member Avatar for stryker4526
-1
225
Member Avatar for eternaloptimist

i have a few questions.: 1)if i wanted to write a line of code needed to declare a 1-dimensional array named names that can hold 8 string values would this be correct?: char names[8]; 2)how would i write the code needed to assign strings to each element of the array …

Member Avatar for eternaloptimist
0
107
Member Avatar for DJPlayer

I have to lines listed.. a cin >> x and a scanf("%f",&x). If I use cin program works perfectly.. change it to scanf and values arent' even corect any longer.. different decimal values all together.. anyone??? [CODE] #include <iostream> #include <cstdlib> #include <cmath> using namespace std; double ApproxCos(double,double); int main() …

Member Avatar for Narue
0
156
Member Avatar for anjoz

i have a problem with this code iv been try lots of expressions to show elven thousand to nineteen thousand and nothing seems to be can you guys help me out tnx in advance [code] #include<stdio.h> int main() { int n,teens,thousands,hundreds,tens,ones,tthousands; printf("Enter a number: "); scanf("%d", &n); tthousands=n/10000; n=n%10000; thousands=n/1000; …

Member Avatar for abhimanipal
0
76
Member Avatar for rEhSi_123

Hello everybody! I am trying to create folder's which will contain files and lastly all these files will contain texts. My problem is that am not able to create this folder into a specific location or pathname!!! Here is the code, please advice accordingly: [CODE] #include<stdio.h> #include<sys/stat.h> int main() { …

Member Avatar for WaltP
0
2K
Member Avatar for holocron

Hello all, Here I intend to reverse a line of text ending in a newline, but only the individual words will be reversed, not every character. For example, "This is just a test." would output ".test a just is This". The code as stands prints a space for every character …

Member Avatar for WaltP
1
694
Member Avatar for furqankhyraj

[CODE] #include<stdio.h> #include<conio.h> void main() { int n,f; f=1; printf("Enter the number:\n"); scanf("%d",&n); while(n>0) { printf("%d",n); f=f*n; n--; } printf("The factorial of the integer is:%d",f); getch(); } [/CODE]

Member Avatar for WaltP
0
150
Member Avatar for hemant_is_here

hi all plz explain me with syntax "how to pass pointer to a function or pointers to a function " . plz tell me if there any big tutorial which can solve my problem providing a deep knowledge about it . and one more probim : what is incorrect int …

Member Avatar for jamma
0
806
Member Avatar for sushilmunot

hi guys.. can cayone pls tell me how to accept images in c as an input and process them further for compression using jpeg algo. pls help me as i'm stuck up in the beginning of the project

Member Avatar for Salem
-4
195
Member Avatar for Zaelis

Ive been working on a Game of Life simulator in C for my programming class. Essentially, it needs to take a single line of input and print out a nice grid of x's and o's (representing live cells and dead cells, respectively). I need to input the grid size, the …

Member Avatar for erantivanisha
0
144
Member Avatar for saracooper

Hello, I am working with variable arguments and I have no problem using them with Integer, Float or char arrays. But when I try to use String arrays, it is a multidimensional array and I am not sure ... I am calling a function with variable arguments, one of which …

Member Avatar for saracooper
0
2K
Member Avatar for truthuntold

I am running into problem on getting this program done. Its suppose to quiz you on your 2 powers ie(2^2 = 4, 2^22 = 2m, 2^46 = 32t) I've programmed in python for a couple years but a lot of the tricks python lets us have C++ doesn't or I …

Member Avatar for WaltP
0
100
Member Avatar for Vhalor

Hey guys, been to the forum a couple times but never posted. Thought I'd give it a try. So my problem is basically this. I'm to create a program which reads a line in this form "-6 1 2 3 6" "-10 1 2 5 10" -6 being a perfect …

Member Avatar for Narue
0
124
Member Avatar for flipjoebanana

Is there a way to hide assembly code when my C code references a library function that deals with memory? (Not showing 'asm' code)?

Member Avatar for gerard4143
0
133
Member Avatar for hsp700

What is the keycode of "Escape" while using curses.h???? is it KEY_EXIT?? I hv used this bellow but when i press escape, it prints "^[" instead of stopping the loop! and when i press "g", it does what i want the code to do when "escape" is pressed!!...Help! I am …

Member Avatar for IsharaComix
0
12K
Member Avatar for skorm909

here is my script: [CODE]#include <iostream> #include <cmath> int main() { using namespace std; int who; cout << "how are you today? good, bad, or eh?" << endl; cin >> who; if (who == "good") { cout << "ahh thats pretty cool i guess..." << endl; } if (who == …

Member Avatar for skorm909
0
362
Member Avatar for smbee

I am writing the game of life code. Now this is running for smaller size of matrices, but I need this to run for big matrices. So I need to deallocate the memory somehow. I tried it with the //deallocate part at the end of calculate(). But now its showing …

Member Avatar for Ancient Dragon
0
146
Member Avatar for devster123456

I am currently trying to generate a program using a double nested for loop to get the following output: >Please enter the maximum integer value you wish to find divisors: 10 >List of divisors of the integer between 1 and 10: >divisors of 1: 1 >divisors of 2: 1, 2 …

Member Avatar for Agni
0
452
Member Avatar for robinotje

Hello everybody, I was trying to make a telephone directory, when I ran in to several problems with the compiling. When I fixed these, I saw that the programm wasn't working as I want it to work :) Can anyone tell me what I did wrong, and try to help …

Member Avatar for WaltP
0
455
Member Avatar for needhelpe

i already did a program that encrypts letters by skipping 1 or 2. but now i need to make a program that encrypts a word, using substitution. I already try several things but i can't get it work. can anybody help me? for example the normal key is a,b,c,d,e and …

Member Avatar for holocron
-2
107
Member Avatar for sweetnidhi

cprogram i doing mca so i do one program the defination is: do binary addition of 8 bit number

Member Avatar for lamoracke
-1
77
Member Avatar for bobbyross

I am new student in c programming class and I have to do a program that shows "currency Conversion" and then make a flow chart and control sheet.

Member Avatar for WaltP
0
205
Member Avatar for hsp700

Is there any character that takes cursor to previous line? printf("H\n"); will print H and then take cursor to newline(1 step down). output: ............ H _ ............ But is there any control character that will work in the following way: printf("\nH(the character i am finding)"); takes cursor in newline, prints …

Member Avatar for Dave Sinkula
0
82
Member Avatar for Rajesh iPhone

[b]Split from - [url]http://www.daniweb.com/forums/thread33991.html[/url] [/b] Hi, I need a logic to align 10 variables in different order every time a user logs into the application. Thanks in Advance :)

Member Avatar for Salem
-3
34
Member Avatar for jdpjtp910

I have a program for school. The program is an inventory program. It will start by writing blank records to a file. The user then should have a case drive menu. The user will select an option for what action they desire. Actions are add new record, change record, and …

Member Avatar for dusktreader
0
2K
Member Avatar for onaclov2000

I've been given an assignment in class to take some code and work on improving the optimization, we can either write new code or use old code. For some reason I can't think of anything that would be a good example of code that can use multiple optimization techniques, I.E. …

Member Avatar for onaclov2000
0
92
Member Avatar for sfreema4

I am having issues with outputting a string correctly that is coming from a 4K read buffer. Here is the code I have currently: read_4K.c (cannot be modified) [code=c] int read_4K(char *b) { return read(0, b, 4096); } [/code] reader.c [code=c] static char Buffer[4096]; static int Bend = 0; static …

Member Avatar for tmoorez06
0
209
Member Avatar for gagan gowda

hi, i am doing a project in c(linux).the topic is authenticating and authorizing the client before accessing the file from the server.i already wrote the code for creating a client and server with allowing access to 10 client.for authentication if u cant give some tips or code please do reply.

Member Avatar for gagan gowda
-1
84
Member Avatar for arsenal_fan

Hi, I got this code for computing permutations of a string from the programming interviews exposed book. I am unable to think as to how recursion works in this case. Now, if the input string is "hat", then I have understood the sequence of recursive calls that lead to the …

Member Avatar for Ancient Dragon
0
137
Member Avatar for eablair

[b]Split from - [url]http://www.daniweb.com/forums/thread47395.html[/url] [/b] [QUOTE=rhp405;226272]Ok, here's the solution. When you have a pipe open in parent process, you have to close the pipe before waiting. It has to do with the file descriptor counters of the pipe ends, they have to be zeroes to not cause a child to …

Member Avatar for eablair
0
172
Member Avatar for abhimanipal

Hello People, Does any one have any practice problem sets for C. I am interviewing for a company tomorrow and they ask lots of "Whats the output ?" kind of questions.. Any help would be appreciated

Member Avatar for Salem
0
101
Member Avatar for tuckerblue

I have a few C# questions too, but this is mainly an ASP problem I think. All the code I mention below takes place in the code-behind of my Master Page. I worry a lack of knowledge on master pages may be the problem too. Excuse the database name; my …

0
67
Member Avatar for gangsta1903

[code=c] #include <stdio.h> int main() { char name[50]; printf("enter your name:"); gets(name); puts(name); return 0; } [/code] hello, the above program should first print out "enter your name:", but it does not. it occurs in this way on the console: --------------------------- abc enter your name:abc --------------------------- it prints "enter your …

Member Avatar for gerard4143
0
71
Member Avatar for heredia21

#include <iostream> using namespace std; int num, factorial; num = 6; factorial = Fact(num); cout << num << "! = " << factorial; return 0; } // end main int Fact (int num) { if (num == 0) return 1; else return num*Fact(num-1); } //end Fact int main() What is …

Member Avatar for heredia21
0
70

The End.