18,491 Topics

Member Avatar for
Member Avatar for gurneks04

hi i m student and m making paint brush . i want to get image inside a circle to paste anywhere on screen. actually i want to create a circle with the previous screen under the circle to be visualize again so that my circle would look like empty circle …

Member Avatar for kc0arf
0
125
Member Avatar for desertstorm

1. I am using strtok() and am storing the return value into a char array. eg. char word[]; word = strtok(file[][], " "); Do I need to initialize 'word' to a constant size before using it? The thing is I don't know how big the string from strtok is going …

Member Avatar for Narue
0
157
Member Avatar for harshchandra

[code] # include<stdio.h> void main() { int p; p = (1,2,2,100,1); printf("%d",p); } [/code] I dont know what will be the output . Can anyone please tell me what exactly second line implies ?? :rolleyes:

Member Avatar for akshatvig19
0
153
Member Avatar for morgan_morgen

Hi! I want to write a program to calculate Fibonacci number NON-RECURSIVE I tried many times but I could not get the result(0-1-1-2-3-5-8...). Please help me. [code] #include <stdio.h> unsigned int f(int n) { int i; unsigned int last=0,current=1; int result; for(i=1; i<=n; i++) { last+=current; //???????? printf("-%d",last); } return …

Member Avatar for Gary King
0
160
Member Avatar for AhmedHan

We have a struct defined as : typedef struct tagWINDOWPOS { /* wp */ HWND hwnd; HWND hwndInsertAfter; int x; int y; int cx; int cy; UINT flags; } WINDOWPOS; Then we are sent a message... WM_WINDOWPOSCHANGING WPARAM wParam LPARAM lParam; Parameters wParam This parameter is not used. lParam Pointer …

Member Avatar for AhmedHan
0
300
Member Avatar for PeterX

[code] #include<stdio.h> int main(){ double price=500; double year=5; double total; if(price==500) { //???????????????????? scanf("%f", &price); printf("%f\n", price); } total=(price * year); printf("%f\n", total); } [/code] why the scanf() can not get a new value from keyboard. I want to give a new value to the price but the out put …

Member Avatar for Ancient Dragon
0
95
Member Avatar for lsy
Member Avatar for lsy
0
104
Member Avatar for mmiikkee12

I've been trying to compile OSKit under Cygwin. It gave me a bunch of errors, most of which I fixed. I can't fix this one though: [code] /* * Copyright (c) 1996-2000 University of Utah and the Flux Group. * All rights reserved. * * This file is part of …

Member Avatar for mmiikkee12
0
146
Member Avatar for PeterX

Hi! I have problem with type conversion. when I compile the program I get this error: ( 'count' : redefinition; different basic types ). please tell me about type conversion. [Code] #include<stdio.h> int count(double houre, double charge); int main(){ double h=4; double c=2; printf("%d\n", count(h,c)); return 0; } int count(double …

Member Avatar for PeterX
0
113
Member Avatar for SpS

When a structure is assigned, passed, or returned, the copying is done monolithically....what does this monolithic mean any example??

Member Avatar for Rashakil Fol
0
179
Member Avatar for calcop

I everyone, I have two C Socket questions. I have searched the net and read my reference books, but cannot find my answer. Anyway, I am making a simple telnet based server. To create a new socket I am using the following code: [CODE]newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, …

Member Avatar for calcop
0
117
Member Avatar for ankitrastogi82

As null pointer points to nothing. So, How does the following code works #include <stdio.h> class cb { public: void HelloB() { printf("Calling cb\n"); }; }; int main(void) { cb* pb = 0; pb->HelloB(); // should it crash here ? return 0; }

Member Avatar for SpS
0
198
Member Avatar for trashed

hi everybody. i am trying to develop a program that will be able to read and export informations (hw, sw, kernel, netstats..ecc) from a linux computer. my idea was to use the files in the [b]/proc[/b] directory but i can't get the script to work - this is what i …

Member Avatar for trashed
0
3K
Member Avatar for este77

I need help with some homework. I need to write a program that uses a while statement to determine and print the largest number of 10 numbers input by the user. The program should use three variables: counter: A counter to count to 10, (to keep track of how many …

Member Avatar for Dave Sinkula
0
183
Member Avatar for senthilselvi

Hi All, Iam wondering is there any opensource xhtml parser (c) available ? Thanks in advance -

Member Avatar for Dave Sinkula
0
50
Member Avatar for john_27

Hi all, I am a newbie to python and am not sure,what i am doing is correct or not ,i wanna call c function from within python. i have my python program as: [code] import DLL if __name__ == "__main__": for i in range(1,6): DLL.RECEIVE_FROM_IL_S(10,50) [/code] here RECEIVE_FROM_IL_S() is c …

Member Avatar for vegaseat
0
232
Member Avatar for SpS

[code] #include <iostream> int main(int argc, char *argv[]) { int count=0; if (argc<2) { std::cout<<"Wrong No Of Parameters"; exit(1); } FILE *file; file=fopen(argv[1],"r"); char c; while((c=getc(file))!=EOF) { if (c=='\n') { count+=1; std::cout<<std::endl; } else printf("%c",c); } std::cout<<"\nNo Of Lines In the File :"<<count+1; fclose(file); return 0; } [/code] My program …

Member Avatar for Ancient Dragon
0
122
Member Avatar for Piotr_Machner

I've got a function with a variable list of arguments: [CODE]Execute(int arg1, int arg2, int arg3, int arg4, int argLast, ...)[/CODE] I want to write another function that intercepts Execute. I want it to have the same argument list and pass all these arguments to Execute. For example something like …

Member Avatar for Piotr_Machner
0
99
Member Avatar for Mahen

am currently building a program that runs as a background process, but due to the loops inside it, Windows fails to Close it when it goes into either shutdown or LOGOFF mode. It is a GUI program that uses WINMAIN but without a GUI interface. Can you tell me how …

Member Avatar for Stoned_coder
0
115
Member Avatar for alajaji

Hey guys am new in C, could anyone help me with this? write a program that store the values x and 76.1 in seperate memory cells, your program should get the values as data itmes and display them again for the user when done. thanks

Member Avatar for shaji
0
231
Member Avatar for tkaung80

Dear all, I am very newbie here and I'd like to start learning C programming. My OS is windows XP. Could anybody please tell me where to get C compiler ? Thanks in advance! Any help much appreciated. rgds, tkaung

Member Avatar for calcop
0
432
Member Avatar for Micko

Hello, by searching explanations and code for heap sort I found tghis code: [code] #include <stdio.h> #define less(a, b) ((a) < (b)) static void exchange ( int *a, int *b ) { int t = *a; *a = *b; *b = t; } static void fixDown ( int *a, int …

Member Avatar for Micko
0
283
Member Avatar for SpS
Member Avatar for Narue
0
171
Member Avatar for mina1984

i need help on a program that uses zenos series which calculates the sum of the first N terms of Zenos series, where N is what the user inputs. it should be a number 1 and 15 (inclusive). program should print n terms of the series seperated by + and …

Member Avatar for Ancient Dragon
0
133
Member Avatar for kahaj

What purpose exactly does scaling / shifting rand values serve? The book I'm learning from really doesn't seem to explain what these actions do. -Clifton

Member Avatar for kahaj
0
280
Member Avatar for CrazyDieter

Hie, Do you know how to read the activity of a serial device (COMx) under windows ? I would like to write a program that could sniff the serial/ port.

0
73
Member Avatar for Acidburn

Basically I've got a const string (it stays the same lenght) Only trying to implement it into OOP. heres the constructor: [php]score::score(void) { lives = 5; char * end = { " --------------+-\n" " + |\n " "+ ?\n" " +\n" " +\n" " +\n" " +\n" }; strcpy( death, …

Member Avatar for Stoned_coder
0
165
Member Avatar for winbatch

Hi, I have a program that needs to perform billions of loops. I want to print out something to the screen for every certain number of iterations (ie let's say 1 million). Because % is only suposed to work for integers, how do I get the equivalent functionality with long …

Member Avatar for winbatch
0
139
Member Avatar for mikan1983

right now i am making project on RC4 and i have gotten a lot problem about fixing error i do not know which i did wrong if possibly anyone who ever done RC4 coding project before pls give me an advice. thank u

Member Avatar for Stoned_coder
0
119
Member Avatar for SpS

We cannot have static friend function...is it because 1.since static member functions can access only static data members...whereas friend function can access all the members. 2.friend function also require an object to access the members...wheeras static member functions can not. 3.One more thing....since friend functions are non-member functions....and static functions …

Member Avatar for Stoned_coder
0
195
Member Avatar for PeterX

Hi! I want to learn C programming. I have problem whit print out. if I have: [code] double value_1; int value_2; // how do I print out double ....? printf(?????) [/code] if I have [code] int A=5; double B=10.5; result=(double) A/B // the result type is double but how do …

Member Avatar for Dave Sinkula
0
127
Member Avatar for smithag261

I want to know how to write a program to print all Armstrong numbers between 1 and 500.

Member Avatar for Dave Sinkula
1
248
Member Avatar for yarlini

Hi ive had to write an emulator for a specific MIPS program in C, but i also need to either single step through the emulator one instruction at a time or simply let it run, at the moment its running, but im not sure how i can step through it …

Member Avatar for CrazyDieter
0
165
Member Avatar for md_salman

although this question is basically related to a data structure, still I think that a good progrmmer should be able to answer it. My question is that [B]"is it possible to determine the order in which some ( numbers or characters etc ) are arrived for insertion into a min …

Member Avatar for ITgeneration
0
432
Member Avatar for Mahen

1. typedef int (*MYPROC)(LPTSTR); 2. hinstLib = LoadLibrary(TEXT("myputs")); 3. ProcAdd = (MYPROC) GetProcAddress(hinstLib, TEXT("myPuts"));

Member Avatar for Dave Sinkula
0
82
Member Avatar for 123abc

Write a program that prompts the user to input a length expressed in centimeters. The program should then convert the length to inches and output the length expressed in yards, feet, and inches, in that order. For example suppose the input for centimeters is 312. To the nearest inch, 312 …

Member Avatar for 123abc
0
259
Member Avatar for SpS

[code] #include <stdlib.h> #include <stdio.h> #define SIZE 15 int main() { int *a, i; a = (int*) malloc(SIZE*sizeof(int)); for (i=0; i<SIZE; i++) *(a + i) = i * i; for (i=0; i<SIZE; i++) printf("%d\n", *a++); free(a); return 0; } [/code] Why Is My Program Crashing??

Member Avatar for Drowzee
0
192
Member Avatar for k_en

Do anyone know why i got this error mesage ? Linking... msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main Debug/welcome.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. welcome.exe - 2 error(s), 0 warning(s)

Member Avatar for Ancient Dragon
0
123
Member Avatar for desertstorm

Could someone help me with this. I need to know how to write this in code for C. "if hashValue(variable) has a non-zero bit in the 4 leftmost (highest) bits" It has to do with bitwise shifting and is basically just an if statement's condition. Thanks

Member Avatar for desertstorm
0
151
Member Avatar for cuonggenie

there is a stack which is pushed with different size pancake. the problem is how to sort this stack so that the largest pancake is on the bottom the smallest is on the top. The size of pancake is given by the integer. for example 8 6 4 5 7 …

Member Avatar for Drowzee
0
100
Member Avatar for PeterX

Hi! [code] for (year = 1; year <= 15; year++) { cost = (interest_cost + monthly_instalment); totalCost+=cost; //after how many years the totalCost > price if(totalCost>price) printf(" %d ", year); } [/code] question:after how many years the totalCost > price? my problem: if the price is equal to 10 $ …

Member Avatar for Drowzee
0
351
Member Avatar for Mahen

Hey, I don't know if am wrong but I think a new idea has just striked me. We can all see that almost every program that we can imagine of has been created, thus making it difficult for us to think of new ideas or programs. But all these programs …

Member Avatar for Mahen
0
326
Member Avatar for Funktar

Hi, so I've got this program("main") that fork executes another ("user"). These programs communicate through fifos. One communication is a spawn call, where user passes an executable, main forks and executes it. So, I'm keeping track of all my processes using a task table. After the fork (for the spawn …

0
124
Member Avatar for DotNetUser

I have a string that is retrieved from a socket. I display this string as the text of a button. Some strings contains a '' which doesn't get printed because it's an escape character. So, I want to find all '' and replace it with a "\\" so it will …

Member Avatar for Drowzee
0
265
Member Avatar for Mike182

I was wondering if anyone could help me with some things, im planning on making a little security program that comes up after logon to windows through the logon screen, reads a password from a file specified (for example 'E:\password.txt', and asks you to put in your password, if its …

Member Avatar for Mike182
0
273
Member Avatar for Drowzee

I'm almost done with my project, due in great part to the support and well-reasoned criticism here at Daniweb. But there's one last little problem that's only hitting me in release mode. In debug, the following function works fine to set information from a user-entered string to the CString/CString Map. …

0
121
Member Avatar for ashwinperti

void main() { float a = 0.7; if(a < 0.7) printf("YES"); else printf("NO); } But this function always prints NO. And when it is made Greater than 0.7 It shows YES Why is it so with float variable Ashwin Perti

Member Avatar for Balachandran
0
183
Member Avatar for SpS

sizeof (int) gives me 4 bytes...is it sufficient to say that my machine is of type 32-bit

Member Avatar for SpS
0
384
Member Avatar for Niklas

Okay Im going to try to make an Ebay auto bidder. Here is the layout of the program that I have brainstormed so far. 1. Enter URL of auction you would like it to bid on 2. It automatically checks how much time is left in auction and refreshes every …

Member Avatar for Niklas
0
176
Member Avatar for pre_wreck

dear guru's, I had a problem in C, and i seems i can't figure out why this piece of codes seems not working properly, kindly help my with my little problem? /* My problem here is, how can i copy the file into other file name, i just wanted to …

Member Avatar for pre_wreck
0
189

The End.