| |
thread by: Paminu |
last post Feb 7 '06 by: FlyingBird
On a gentoo linux system i don't get any warnings when I comlpile this code:
#include <stdio.h>
typedef struct test
{
void *content;
struct test_ *bob;
} test_;
|
thread by: FalkoG |
last post Nov 14 '05 by: addy.amu
Hello colleague
I want to convert a floating number for example 5236.9856982 to a
hexadecimal number.
I'd tried several things but my problem is to convert the position
after decimal point. I searched numberless websites but nothing could
answer my question.
I would be pleased to get some help.
Regards
|
thread by: John Tiger |
last post Jul 19 '05 by: ghl
Can anybody have idea about the difference between #include
<iostream.h> and
#include <iostream>. Is later one valid statement on any compiler. I
tried compiling on MSVC second statement give compilation error as
#include expect filename.
Anu help would be appreciated.
thanx,
John
|
thread by: Player |
last post Jul 19 '05 by: Mike Wahler
Hi,
I'm beginner and have problems by using function square from math.h
Compajler:
Borland C++ 5.5.1 for Win32
Code:
#include <iostream.h>
#include <math.h>
|
thread by: Ben Bullock |
last post Nov 15 '05 by: Chris Croughton
Hi,
I want to print a string of UTF8 encoded characters as two-character
hexadecimals.
For example I want to print Unicode 3003 as "E3 80 85".
My problem is, what format string should I use? I tried
printf ("%X ", c);
|
thread by: aRiFiN |
last post Nov 7 '17 by: Tasnin Khan
im newbie here.. n need some help..
alphabets got 26 character n each character got secret number..
example: a = 01
|
thread by: Thomas Baier |
last post Jul 19 '05 by: J. Campbell
Hi there,
I need to know how to get the elapsed time in milliseconds. I tried
time_t start,end;
time(start);
do_something();
time(end);
double dif = difftime(end, start);
|
| |
thread by: Nikolai Borissov |
last post Jul 19 '05 by: Rolf Magnus
I know that C++ Standard does not impose any requirements for the size of
_long_ type. I wonder what is the size of _long_ in reality? I don't think
that there are architectures with 1-byte _long_. I think, the most probable
size for _long_ would be 4 bytes. What about 2-byte _long_, are there any
architectures with that size?
Thanks,
...
|
thread by: David Marsh |
last post Jan 22 '07 by: Flash Gordon
I accidentally typed %b instead of %d in a printf format string
and got a binary representation of the number. Is that standard C
or a compiler extension?
|
thread by: Al-Burak |
last post Jan 24 '06 by: Ben Radford
How can I find the length of a character pointer in 'C'?
TIA
|
thread by: music4 |
last post Nov 14 '05 by: CBFalconer
Greetings,
I need to use a long long data type integer in my program, but how to print
it with printf() or an alternative? My platform is Solaris 2.7 32bit
operating system, and I use Sun Forte 6 C compiler.
Thanks in advance!
Evan
|
thread by: mike79 |
last post Nov 13 '05 by: Sidney Cadot
hi all..
if I wanted to malloc a struct, say the following:
struct myStruct1
{
int number;
char *string;
}
|
thread by: Steven T. Hatton |
last post Jul 22 '05 by: marbac
I can get the accurate value of Pi to an arbitrary precision, but it would
be nice to have it directly and readily available as a standard feature of
the language. Have I overlooked something, or is it not there?
ISO/IEC14882:2003(E) offers me this:
template<class T> complex<T> log(const complex<T>& x);
"4 Notes: the branch cuts are...
|
thread by: LKavitha4 |
last post Oct 27 '10 by: Sriram raghav
hi,
Please tell me what header file is used for sleep ( ) function in linux c++.
Thank you.
|
thread by: Fernando Barsoba |
last post Nov 15 '05 by: websnarf
Hi all,
I think this has been posted many times.. but I tried several recipes
for obtaining a random number between , but I can't make them work.
So, does anyone know how to generate random number x, for 0<= x <=1??
Thanks,
FBM
|
| |
thread by: Rajesh S R |
last post Apr 8 '07 by: Army1987
Consider the following code:
#include <stdio.h>
int main( void )
{
printf("Hello");
fflush(stdout);
return 0;
}
|
thread by: rami |
last post Jun 27 '08 by: Richard Heathfield
please everybody ,can anyone tell me how to do an infinite loop in C
|
thread by: Kay |
last post Nov 14 '05 by: Al Bowers
how to convert int to char * ?
I have found this in a web site. However, it doesn't work even I change
itoa to atoi including stdlib.h
char str;
int i=567;
str=itoa(i, str, 10);
|
thread by: Banfa |
last post Jan 15 '13 by: ChrisCraft
I felt that this was a good point to start a tutorial on C/C++ programming because clearly we need to have some idea of what we are trying to achieve before we start out. I recently found this definition on the web which I rather like
"Programming is planning how to solve a problem. No matter what method is used -- pencil and paper, slide...
|
thread by: Paul |
last post Nov 15 '05 by: Netocrat
hi, there,
for example,
char *mystr="##this is##a examp#le";
I want to replace all the "##" in mystr with "****". How can I do this?
I checked all the string functions in C, but did not find one.
|
thread by: kenk |
last post Nov 10 '06 by: Banfa
Hi,
Does enyone know how to print string describing the enum value?
For example:
enum MyEnum{F1=1, F2};
...
MyEnum me = F2;
printf("My Value: %d", me);
...
|
thread by: Cmorriskuerten |
last post Nov 13 '05 by: Ben Pfaff
HI,
is this is this solution to test if a number is a prime number or not:
/*
* Is n a prime number?
* Return TRUE (1): n is a prime number
* Return FALSE (0): n is a *not* a prime number
*/
int is_prime_number(int n)
|
thread by: kedar1979 |
last post Jun 1 '07 by: check
I have a character byte.I have to set any bit from it to 1.I am passing a bit position through a function say set_bits(bit_position) .Now give me a c code for this.Also i want to reset this bit again to 0, how can I do it.?
|
| |
thread by: B_Love |
last post May 16 '06 by: Banfa
Hey! When trying to compile the code for a ordered vector class I get the following error:
undefined reference to `WinMain@16'
Anyone have any idea what I might be doing wrong? I've been through this code multiple times and have no idea what would cause an error like this, I've never seen one like it before. Any help would be greatly...
|
thread by: Albert Oppenheimer |
last post Dec 9 '05 by: Albert Oppenheimer
I have a small program, test.c. It runs OK. This is on Linux (kernel
2.6.8.1, GCC 3.4.1).
I decided to convert it to C++ before expanding it to a larger program. I
changed the filename to test.cpp and added
extern "C" {
}
around main and all the non-static subroutines. It compiles OK, but when I
|