Search Results

Showing results 1 to 22 of 22
Search took 0.01 seconds.
Search: Posts Made By: karthik.c ; Forum: C++ and child forums
Forum: C++ Oct 29th, 2009
Replies: 1
Views: 475
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
@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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Posted By karthik.c
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
Solved: hash map in STL
Views: 4,599
Posted By karthik.c
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
Solved: hash map in STL
Views: 4,599
Posted By karthik.c
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
Solved: hash map in STL
Views: 4,599
Posted By karthik.c
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
Solved: hash map in STL
Views: 4,599
Posted By karthik.c
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
Solved: singleton class
Views: 663
Posted By karthik.c
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
Solved: singleton class
Views: 663
Posted By karthik.c
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
Solved: singleton class
Views: 663
Posted By karthik.c
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...
Showing results 1 to 22 of 22

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC