15,549 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
109
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
133
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
132
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
153
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
283
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
88
Member Avatar for Daishi

I happen to be writing a very simple text browser, and I'm having a problem connecting to servers using HTTP1.1 GET messages... HTTP1.0 works fine, I just have a string like this: [CODE] const char *request = "GET / HTTP/1.0\n\n"; [/CODE] This works great, and I receive my html back …

Member Avatar for Daishi
0
166
Member Avatar for lsy
Member Avatar for lsy
0
94
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
137
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
98
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
163
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
99
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
178
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
2K
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
45
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
104
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
84
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
109
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
210
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
260
Member Avatar for SpS
Member Avatar for Narue
0
147
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
118
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
257
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
64
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
143
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
113
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
111
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
184
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
117
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
199

The End.