LOL don't take it offensive.Think practically. I need to solution quickly.sometimes c-board takes time and sometime gamedev.net takes time. so I've posted in both of them.
and I've never said your...
Type: Posts; User: noobcpp
LOL don't take it offensive.Think practically. I need to solution quickly.sometimes c-board takes time and sometime gamedev.net takes time. so I've posted in both of them.
and I've never said your...
I think I've found the problem LessFunctor is designed in such a way that more than one element can get equal weight. But its not a multimap.
and Ya I just made sure that KeyT doesn't need an...
at the end I wrote the stl code that is
_M_impl._M_key_compare(__k,_S_key(__j._M_node))which actually is
_Rb_tree_impl<_Compare>::_Key_compare(__k,_S_key(__j._M_node)) and that means...
I don't need any kinda ordering in the map (I know you would say me to use unordered_map). so I did it always returns true.
thats why I named it FakeLess However I've another LessFunctor that I can...
In one of my code std::map::find() is crashing the programm.
actually I am using map<ConstructPointer, QStringList*>;
My ConstructPointer contains and constructed by two data members of integer...
Thanks all understood
I forgot that std::vector does not name a type rather std::vector<SOMETYPE> is a Typename (Silly mistake)
template <typename T, typename CONT /*= std::vector*/ >
struct Stack{
CONT elem;
};
The above code compiles fine as it should be If I just uncomment the std::vector one it fires compilation...
Ya I've already done it and it gives the same result no change.
Well this is my current code.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct StudentInfo{
//char* name;...
Currently there is no short in my code I've changed all of them to normal int
You can assume something like this.I was showing some of my friends about when we might need to use realloc. suddenly I got stuck and more than 8 hours past still trying to find the answer. I must...
I am confused What would I write to solve this problem ??
But I've already wrote scanf("%d\n", &s); in my code @ Line 9
----------- EDIT ---------
did you mean this ??
printf("Enter Roll of Student %d :\t", i);
//fflush(stdin);
int...
tried just now
do{
//StudentInfo.name removed
printf("Enter Roll of Student %d :\t", i);
//fflush(stdin);
scanf("%d", &(students[i].roll));
printf("\n\nEnter another ? (1/0):\t");...
Well this is my current code
do{
printf("Enter Roll of Student %d :\t", i);
fflush(stdin);
scanf("%d", &(students[i].roll));
printf("\n\nEnter another ? (1/0):\t");
fflush(stdin);...
Hmm after I did
StdInfo* students;
I also did
students = malloc( size*sizeof(StdInfo) );
initially storage for teh Object is also allocated.
I am doing
students = realloc( students,...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct StudentInfo{
unsigned int roll;
};
typedef struct StudentInfo StdInfo;
One solution probabbly can do coertion
If I've
operator std::auto_ptr<Class>(){
return std::auto_ptr<Class>(this);
}
But is this solution recomendable ??
and if all my functions take...
But using smart pointers increases syntactic complexity.
even if I design a macro for general pointer to auto_ptr you still have to type the macro name.
its not an automatic job.
Now I am using.
Js::JType* x = new Js::JType;
list.insert(make_pair(key, x));
return list[key];
It fixes the problem and I think its might raise a null pointer issue which is not going to...
In my class Js::Object I've an operator() overload which returns Js::JType*
all Other Classes in Js Namespace e.g. Js::Number, Js::String etc.. even Js::Object inherits from Js::JType
...
Ok I think these few Lines of Code will explore What I am trying to do.
Js::Array ex;
ex += Js::Number(2);
ex += Js::String("Hello");
ex += "Hello World"
ex += 20;
+= is a testing...
I dont expect a link against literal 5
but not only literals require const X& during += operator overload
But If somebody does like.
const X& y = SOMETHING;
Example ex;
ex += y;
then...
But If I code like this a different problem will appear if I do this. although the problem is not so critical or important.
it is when a pointer is supplied its the vector content is linked with...
so any based on Linux kernal 2.6+ , Mac, windowx Xp+ offers this features ??
Ya I now that.
However one thing I would like to make sure
when an application exists does all Operating System cleans the garbage memory(e.g. new Objects on which delete has not been used)...