Forum: C++ Oct 29th, 2009 |
| Replies: 1 Views: 475 hi guys i tried to read object from a file in cpp using ifstream object like given below:
c++ server:
#include <iostream>
#include <fstream>
#include <string>
#include<sys/types.h>... |
Forum: C++ Oct 28th, 2009 |
| Replies: 1 Views: 475 hi guys ,im trying to send serialized php object to c++ server. i dont have clear idea if it is possible to deserialize the php object in c++ code.i dont know how to convert it into c++ object and... |
Forum: C++ May 23rd, 2009 |
| Replies: 11 Views: 1,152 salem im not that good in pointers and have only vague idea about using it ,so i think i have no other option other than to pass them(structure and map) as void *.
if you think there are other... |
Forum: C++ May 23rd, 2009 |
| Replies: 11 Views: 1,152 ok salem if it is so then why compiler is showing the same error when i write like this:
Map->insert(make_pair(structPtr.Msisdn,structPtr));
i've also included how i've declared everything,so... |
Forum: C++ May 23rd, 2009 |
| Replies: 11 Views: 1,152 ok sure i'll read about it ,but can you tell me how to cast it to correct type,as i did also tried:
Map->insert(make_pair((std::string)structPtr.Msisdn,structPtr));
but was showing the same... |
Forum: C++ May 23rd, 2009 |
| Replies: 11 Views: 1,152 hi salem,i have changed char array fields into std::string in structure declaration ,i also changed the same in map & map iterator declaration.now i tried above code like this :
... |
Forum: C++ May 22nd, 2009 |
| Replies: 11 Views: 1,152 hi salem based on your comment i used std::string and tried to typecast it into correct type like this-
if(strcmp(std::string((char *)structPtr.Msisdn),field)==0)
{
... |
Forum: C++ May 22nd, 2009 |
| Replies: 11 Views: 1,152 hi one correction in the above code,in the HomeNwList.cpp,inside the for loop it is actually :
for( it = HomeMap.begin(); it != HomeMap.end(); it++)
it is not
for( it = HomeNwList.begin();... |
Forum: C++ May 22nd, 2009 |
| Replies: 11 Views: 1,152 hi ,when im trying to insert key-value pair in map(key-char array field of a structure,value-entire structure)im having errors .
NDBAPI/TGBitsNdbApi.cpp: In function `int get_map(Ndb*, char*,... |
Forum: C++ Apr 11th, 2009 |
| Replies: 13 Views: 532 @above code-there is no need to put any open/close paranthesis iniside each case statements... |
Forum: C++ Mar 17th, 2009 |
| Replies: 8 Views: 666 thanx a lot mcriscolo,your explanation was satisfactory ...but i would also like to know if there is any sequential order by which rules defined in the makefile are evaluated or it doesnt matter here... |
Forum: C++ Mar 16th, 2009 |
| Replies: 8 Views: 666 hi mcriscolo, i tried your make file and its working fine without any problem,but still i've some doubts in it to clarify...
>>The other major addition is the ".cpp.o" rule to build the objects... |
Forum: C++ Mar 14th, 2009 |
| Replies: 8 Views: 666 hi mcriscolo ,im sorry i actually misplaced 'ls' in the SOURCES and HEADERS path but later when i gave make command it showed some errors like this:
[root@localhost makedemo]# make
g++ -c -o... |
Forum: C++ Mar 13th, 2009 |
| Replies: 8 Views: 666 hi mcriscolo ,im still having problem after changing it to the way u have told..
error was like this:
[root@localhost makedemo]# make
/bin/sh: /root/workspace/source/: is a directory
/bin/sh:... |
Forum: C++ Mar 13th, 2009 |
| Replies: 8 Views: 666 hi guys im trying to write a makefile which contains :two cpp files and two header files.
now i've put cppfiles in a folder called source whose path is: /root/workspace/source
and header files in... |
Forum: C++ Mar 6th, 2009 |
| Replies: 6 Views: 4,599 hi shibukumar, i actually was trying to program the code which was given in a site where they are using hash_map at the same time they are also saying hashtable Datastructure is not part of c++... |
Forum: C++ Mar 6th, 2009 |
| Replies: 6 Views: 4,599 hi again,im having some problem while coding with hash_map
my coding was like this:
#include<iostream>
#include<hash_map>
using namespace std;
int main()
{
typedef... |
Forum: C++ Mar 6th, 2009 |
| Replies: 6 Views: 4,599 thanks narue ,i tried out both ways of inserting:using pair object and operator overload and program is working fine. |
Forum: C++ Mar 5th, 2009 |
| Replies: 6 Views: 4,599 hi guys, im trying to do map in cpp using STL and when i ran a simple program it was showing error that:
error:... |
Forum: C++ Mar 3rd, 2009 |
| Replies: 5 Views: 663 hi jencas ,thanks for your suggestion and i've already google searched it and this was one of the simple as well as bad code i came across .so i would just like to know whether it forms a singleton... |
Forum: C++ Mar 3rd, 2009 |
| Replies: 5 Views: 663 hi arkm,i would take your suggestion and improve myself and i'm really sorry for posting c++/c mixture code...exact code is like this...
#include<iostream.h>
class Sample
{
static int count;... |
Forum: C++ Mar 3rd, 2009 |
| Replies: 5 Views: 663 Hi guys ,i came across coding in a book where they given the below program and named it as singleton class.but here we are able to create 2nd object and also call constructor for second object (only... |