Search Results

Showing results 1 to 29 of 29
Search took 0.01 seconds.
Search: Posts Made By: ZuK
Forum: C Jan 30th, 2005
Replies: 11
Views: 18,052
Posted By ZuK
Ok. This is too much.
@kc0arf : would you remove my account.
Bye
Forum: C Jan 28th, 2005
Replies: 11
Views: 18,052
Posted By ZuK
You should have said: Only if your program looks like this

#include <conio.h>

void main() /* For added realism */
{
clrscr(); /* Silly and useless */

/* Program without clrscr here */...
Forum: C Jan 28th, 2005
Replies: 11
Views: 18,052
Posted By ZuK
I guess you are talking about programming in an environment with a GUI. But I am still using lots of programs from times
where no such thing as a GUI was available. In such an environment clrscr()...
Forum: C Jan 28th, 2005
Replies: 3
Views: 2,200
Posted By ZuK
http://www.libpng.org/pub/png/libpng-1.0.3-manual.html
K.
Forum: C Jan 28th, 2005
Replies: 11
Views: 18,052
Posted By ZuK
@Narue: This is ridiculous.
The Op is asking for a way to port a program from one OS to another and you are telling him to throw away a probably perfectly working program
and start to design from...
Forum: C Jan 27th, 2005
Replies: 11
Views: 18,052
Posted By ZuK
Have a look at the ncurses library
http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
K.
Forum: C++ Oct 30th, 2004
Replies: 3
Views: 3,601
Posted By ZuK
I would try it this way:
#include <iostream>

static int is_valid_function_name(const char *function_name_string){
for( ; *function_name_string !='\0' ; function_name_string++ ){
switch...
Forum: C++ Oct 30th, 2004
Replies: 2
Views: 6,209
Posted By ZuK
after playing with your code

#include<iostream>
using namespace std;

const int n_row =26;
const int n_col= 2;
const char tarray[n_row][n_col]= {
{'A', '?'},
{'B', '!'},
Forum: C++ Oct 26th, 2004
Replies: 1
Views: 4,651
Posted By ZuK
try this
char result;
result=(int)(ceil(r+(2.6*m-.2)-2*c+d+(c/4.0)+(d/4.0)))%7;

K.
Forum: C++ Oct 25th, 2004
Replies: 4
Views: 5,845
Posted By ZuK
while(int(newPin.length) != 4);
should be
while( newPin.length() != 4); // length() is a memberfunction of string
K.
Forum: C Oct 25th, 2004
Replies: 1
Views: 3,145
Posted By ZuK
I think your main problem is here
//and I allocate memory as
dxf =(struct dxfdata *)malloc(sizeof(struct dxfdata));
dxf->ptrgeometry = (struct geometry *)malloc(sizeof(struct geometry));
temp =...
Forum: C Oct 16th, 2004
Replies: 2
Views: 1,896
Posted By ZuK
http://www.daniweb.com/techtalkforums/announcement.php?f=8&announcementid=2
Forum: C++ Oct 16th, 2004
Replies: 4
Views: 3,964
Posted By ZuK
I do not really understand the problem that you have. But a few explanations might help
if (ID >= 0) {
return true; // you're returning from the call here
bool isValidStatus; ...
Forum: C Oct 15th, 2004
Replies: 7
Views: 2,031
Posted By ZuK
I was wandering the same thing
#include<iomanip.h>
==> C++ code.
sizeof(struct record)
==> C code ?? .
Forum: C++ Oct 15th, 2004
Replies: 4
Views: 4,651
Posted By ZuK
There is no need to take Naru's comments too serious.
Forum: C Oct 14th, 2004
Replies: 13
Views: 3,962
Posted By ZuK
I have modified your code a little.


// Calcolo formula per Legge di Murphy (www.andreagozzi.com)
// Inclusione librerie in directory di sistema
#include <math.h>
#include <stdio.h>
#include...
Forum: C Oct 14th, 2004
Replies: 13
Views: 3,962
Posted By ZuK
I guess in your example x is an angle of 9.0 degrees.
so you have to write
result = 1-sin((x*3.1415926/180)/10.0);
K.
Forum: C Oct 14th, 2004
Replies: 13
Views: 3,962
Posted By ZuK
but sin doesn't compute an angle. does it ? maybe you should feel the way you feel. I wander who is clueless here.
K
Forum: C++ Oct 14th, 2004
Replies: 1
Views: 1,667
Posted By ZuK
Hi
Your calculation of the percentage is wrong.
e.g you want to add 10% you write
f_ccost = f_acost + 10.0/100;
but it should be
f_ccost = f_acost + f_acost*10.0/100;
K.
Forum: C Oct 14th, 2004
Replies: 13
Views: 3,962
Posted By ZuK
I think your'e confused.
sin doesn't return any angle, neither radiants nor degrees.
sin takes radiants as its parameter and returns a value in the range of -1 .. +1;
K.
Forum: C++ Oct 8th, 2004
Replies: 4
Views: 4,084
Posted By ZuK
guess there is an "&" too many :sad:
Forum: C++ Oct 8th, 2004
Replies: 4
Views: 4,084
Posted By ZuK
void calculate_total (total)
{
cout << total;
}
has to be
void calculate_total (float &total)
{
cout << total;
}
about the warnings:
Forum: C++ Oct 3rd, 2004
Replies: 4
Views: 6,967
Posted By ZuK
is that what you want ?

#include <iostream>

using namespace std;

int main()
{
int number, c, d, e;
cout << "Enter a Positive Integer from 0 to 999." << endl;
Forum: C++ Oct 3rd, 2004
Replies: 10
Views: 51,909
Posted By ZuK
cout<<"The upper case character corresponding is"<<endl;
you are not outputting ch.

besides this there are some "else" missing.
and you should not use the old headers
K.
Forum: C Oct 2nd, 2004
Replies: 20
Views: 5,216
Posted By ZuK
Actually I do ( did ) know the range of numbers that can be represented by a double. What I underestimated ( quite a lot I must admit ) is the level of recoursion that occurs in computing the...
Forum: C Oct 2nd, 2004
Replies: 20
Views: 5,216
Posted By ZuK
> but it should be immediately obvious that a double couldn't possibly hold a factorial anywhere close to 3999!.
sorry for beeing that stupid.
K.
Forum: C Oct 2nd, 2004
Replies: 20
Views: 5,216
Posted By ZuK
I did not mean to insist on my code being correct. My statement was meant to explain why I did not recognize the mistake in the first place.
K.
Forum: C Oct 2nd, 2004
Replies: 20
Views: 5,216
Posted By ZuK
@ Narue: you are right that 170! is the largest nr. that fits into a double.
but with my compiler the result is still correct because fact() simply returns inf for larger numbers then 170 and 1/inf...
Forum: C Oct 2nd, 2004
Replies: 20
Views: 5,216
Posted By ZuK
I know that I'm breaking the rule not to make anybody's homwork.
But since the answer is so simple I can not help it to post a solution
#include <iostream>

double fakt(int i)
{
if ( i == 1...
Showing results 1 to 29 of 29

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC