Here is what I coded it and it prints everything upto the decimal point.
void putFloat(double n){
double x;
int r, second;
x = log10(n);
r = n/1000;
Type: Posts; User: arya6000
Here is what I coded it and it prints everything upto the decimal point.
void putFloat(double n){
double x;
int r, second;
x = log10(n);
r = n/1000;
I'm having some trouble making this work. Any one want to give this a try?
what do you mean when you say "I divide the number by 10^3 and round down, which is 6." you divide 3 by 1000 ?
Hello
So the function below can print any int using putchar. But I can't figure out how to print floats using putchar. Any ideas on this?
Regards!
void putDigit(int n){
int pow = 1;
...
Can you explain your hint more please? I'm having a hard time understanding it.
Hello
I casted an int to char and for the number 33 it prints '!' here is the code
int digit;
char cDigit;
digit = 33;
Hi
Is there anyway to write code in c that would connect to a imap server and be able to send and receive email from? if so which library is needed? and can you give a reference page for it?
...
Hi
i have wrote a program that creates objects of another class in the class it self, and I want to be able to save data to the objects I have created, from the class that created them. How can...
Hi
This is a constructor that receives a file name
Bank::Bank(char s[])
{
Hi
I have written a small c++ program that uses Dynamic memory allocation to store strings. I have to create a copy constructor so it does proper copying, but I can't fully understand copy...
Thanks for all of your help, it is working now
I don't mean I tried different kinds of loops I just mean different methods with loops
Hi
I have tried to make this work, but I can't figure out the logic, I want to write the function so that names and email addressed like the following are passed to it and it would put the name in...
Just very simple ones, so I can start understanding game programming for example very simple opengl games
Hi,
I was wondering if anyone can give me some information on how I can find information or tutorials to start learning game programming on linux? This is very interesting to me, so if you know...
Hi
I have wrote this test program for trying different things with c++ and when I pass a character array to a member function, the compiler complains.
Here is the code:
#include <stdio.h>...
I think now I understand, first I have to copy the string into the data member than I can move the characters in the string.
But I'm trying to move characters in "char c[]" which is a character array, would you clarify this?
Hi
I keep getting segmentation fault when the program gets to
c[i] = c[i + 1];
Hello
Lets say if I have an array with the following characters I'll use comma for each block of array:
" ' ','t','e','s','t' "
as you can see the first block contains a space, how can I...
I have been trying to figure this out fir hours and I can't.
I'm trying to write code that if the user enters a string longer than 10 characters, only the first 10 characters are stored in an...
Thanks, now I can start learning it :D
Can you also tell me what I need to create GUI for windows?
Hello
I've finished reading my school's C book which covered arrays, functions, pointers and files and I've started reading the C++ book for next semester and its mostly about OOP, which made me...
Thanks, now that I see it it looks so simple
I can't figure it out