| |
thread by: Vysakh P Pillai |
last post Feb 27 '06 by: Ben Pope
This is my 1st year B-tech Seminar topic.Can anyone plaese give me
someone please give me some points for this????
|
thread by: Ant |
last post Feb 27 '06 by: Michiel.Salters
Hi,
I am having trouble with a member function pointer. It sees to give me the
followign error
Run-Time Check Failure #0 - The value of ESP was not properly saved across a
function call.
It only seems to give me problems if I use the friend class declaration
|
thread by: yay_frogs |
last post Feb 27 '06 by: Kai-Uwe Bux
Here is my problem: suppose there are, say, five events with these
probabilities:
event1 0.7
event2 0.1
event3 0.1
event4 0.05
event5 0.05
Note that sum of the probabilities is 1.0. I would like a function that
|
thread by: highstatesmanship |
last post Feb 27 '06 by: tmp123
GCC in linux 2.6.8
pthread_mutex_lock.c:78: __pthread_mutex_lock: Assertion
`mutex->__data.__owner == 0' failed.
Aborted
|
thread by: plmanikandan |
last post Feb 27 '06 by: Rolf Magnus
Hi,
I have a doubt of storing static variables in memory.I think
static,global variables are stored in the same location.Static,Gloabal
variables are stored in HEAP .Can anybody explain me the storage area
of all type variable in memory
Rgds,
Mani
|
thread by: Steve Edwards |
last post Feb 27 '06 by: Michiel.Salters
Hi,
1)
I'm making a container for string pointers...
set<string*> strSet;
strSet.insert(...); // insert some strings
....
|
thread by: Allerdyce.John |
last post Feb 27 '06 by: Michiel.Salters
Hi,
I have 2 list of class A, is there a STL algorithm which find out if
there is equal element between them (using == operator of A)?
Thank you.
|
| |
thread by: Metaosp |
last post Feb 27 '06 by: Michiel.Salters
Hi,
When it comes to code portability, most people would think C is a better
choice then C++. That was probably true 5 or 10 years ago, but how
about today? Are there still many platforms or devices that have no
good C++ compiler? C++ offers a lot more then C, would you use it to
build a new cross-platform project that will support a...
|
thread by: nitro_punk85 |
last post Feb 27 '06 by: Richard G. Riley
I'm working on a project for my c++ class and I am having trouble
comparing one string to two others using the or operator. It looks
something like this:
if(answer3 == answer1 || answer2)
Is there another command I need to through in there or should I do it a
completely different way?
Any suggestions would be most appreciated.
|
thread by: Raider |
last post Feb 27 '06 by: Raider
I'm trying to get average value. My first attempt is:
#include <...>
template <typename T>
struct avg : public unary_function<T, void>
{
T sum, count;
avg() : sum(0), count(0) {}
void operator()(T value) { sum+=value; ++count; }
|
thread by: aarklon |
last post Feb 27 '06 by: Richard G. Riley
In the article http://en.wikipedia.org/wiki/Type_safety
it is written as
The archetypal type-unsafe language is C because (for example) it is
possible for an integer to be viewed as a function pointer, which can
then be jumped to and executed, causing errors such as segmentation
faults, or (more insidiously) silent failures.
Even...
|
thread by: mmojtabakarimi |
last post Feb 27 '06 by: Ian Collins
Anyone help me i will very happy:
I write my code for dos in bc3.1 and have 700kB exe file .
How can i use 16-bit protected mode and run my exe filr.
|
thread by: Clint Olsen |
last post Feb 27 '06 by: websnarf
I was just thinking about the virtues of C vs. C++ wrt. ADT/generic
programming. The biggest complaint about writing container libraries for
ADTs is that void * offers no type safety. Does it really have to be this
way?
Couldn't you for instance track an object's accesses with void pointers and
ensure they are used consistently across...
|
thread by: basbosa300 |
last post Feb 27 '06 by: Herbert Rosenau
hi
#i am looking for random number generator by c
thanx
|
thread by: newbie |
last post Feb 27 '06 by: Neil
i'm a newbie for c programming.
Anyone can tell me what the meaning of '<<', '>>', '&' and ' | '?
|
| |
thread by: funkyj |
last post Feb 27 '06 by: Dave Thompson
PROBLEM STATEMENT:
I want to calculate the byte offset of a field with a struct at
compile time without instantiating an instance of the struct at
runtime AND I want to do this in an ANSI standard compliant
fashion.
DISCUSSION:
Below is a sample program that demonstrates my solution. My questions
are:
|
thread by: John Smith |
last post Feb 27 '06 by: Dave Thompson
I ran across this code from a statistics library. The header
source code was not available.
long double __declspec(naked) poisson_distribution(int k,long
double m)
{
}
long double pdtrl(int k,long double m )
{
long double v;
|
thread by: mechanicfem |
last post Feb 27 '06 by: Dave Thompson
I thought (as they're in c99) that flexible arrays were there for a
number of reasons - but I also thought they'd be great for stepping
into structures (say) that were aligned in memory after (say) a header
struct, e.g.:
struct element
{
int a;
int b;
};
|
thread by: pinkfloydhomer |
last post Feb 27 '06 by: Dave Thompson
Can I use printf inside a variadic function that I am writing?
Like:
void print(const char * format,...)
{
va_list va;
va_start(va, format);
char buffer; // yeah, I know...
vsprintf(buffer, format, va);
|
thread by: gamehack |
last post Feb 27 '06 by: Dave Thompson
Hi all,
Let me describe the problem. I've a header file util.h which contains
the following:
#ifndef UTIL_H_
#define UTIL_H_
const char DEF_TITLE = "My Title";
int num_chars(int num);
|
thread by: Johs32 |
last post Feb 27 '06 by: Andrey Tarasevich
I am a bit uncertain that this is a good use of pointers:
int *ip;
ip = malloc(sizeof(int));
*ip = 22;
Is there any problems with this declaration and would it survive a function
that returns, if I make the function return a pointer to an int??
|
thread by: Allie |
last post Feb 27 '06 by: A. Sinan Unur
How would I go about sorting this structure by title?
typedef struct {
char author;
char title;
char code;
int hold;
int loan;
} LIBRARY;
|
thread by: Dave Townsend |
last post Feb 27 '06 by: Jerry Coffin
Hi,
I'm working on an implementation of the CORDIC
algorithm for a library of functions.
One of the benefits of the CORDIC algorithm is that you
can implement it with simple additions of numbers and
division of (doubles) by powers of two. However, there
doesn't seem to be any mechanism in the C/C++ language
to direct the compiler to do...
|
| |
thread by: snow.carriers |
last post Feb 27 '06 by: Noclambulist
http://www.rafb.net/paste/results/fTQgRW16.html
Here's my program so far. This is what I'm trying to do:
http://contest-cemc.uwaterloo.ca/ccc/2005/senior/phone.pdf
So far it works fine. The only problem is that I'm not sure how to
input data, s1, into the program. The second thing that I'm not sure
how to input the variable into the function....
|
thread by: Plissken.s |
last post Feb 27 '06 by: Ian Collins
Hi,
Can you please tell me what is the guideline in Putting implmentation
in .h files?
I see examples where they put the implementation of getter/setting in
the .h files where funcitons is > 10 lines of code are put in .cpp
file.
Is that the guideline?
|