Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~4K People Reached

21 Posted Topics

Member Avatar for savinki

Hi, wt is the function that can use to count number of digits in a long integer? e.g. 12345678 -> 8 11 ->2 456 -> 3 6724 -> 4

Member Avatar for Shahzad Ahmad
0
332
Member Avatar for savinki

I want to convert string to integer. My string values are something like 0x000,0x0001 and etc(i.e. values are in hexadecimal format). if i used atoi() function then it will take only 0. but i want the entire string. e.g. string abc = "0x0000"; i want... int i = 0x0000; can …

Member Avatar for spidy.venom
0
117
Member Avatar for savinki

How can we set and get cookies in struts2. I tried with ; [LIST] [/LIST]Cookie a = new Cookie("name","value"); - but this throws a null pointer exception. because of this exception I used CookieInterceptor: CookieInterceptor LoginCookie = new CookieInterceptor(); LoginCookie.setCookiesName("type"); LoginCookie.setCookiesValue("value"); but how can I get the cookie values?

0
78
Member Avatar for savinki
Member Avatar for stultuske
0
75
Member Avatar for savinki

Hi, Can someone please tell me, Is there any builtin function to convert decimal value to a fixed format? e.g. 6 to 0006 10 to 0010 123 to 0123 4987 to 4987

Member Avatar for Radical Edward
0
111
Member Avatar for savinki

I tried to initialized const char pointer to pointer variable. Following is the way i did it.but once i run the program it thows an error(Pops up "encountered an problem and needs to close... Tell microsoft about this problem...") const char * FB="test"; const char **Feedback ; Feedback = &FB; …

Member Avatar for Salem
0
102
Member Avatar for savinki

can someone please explain whats wrong with the below code segment? My intention is to assign characters in pointer "p" to pointer "a" one by one until the end. but this throws run time exception. I want to do assign character by chater without assigneing the entire pointer as a …

Member Avatar for Ancient Dragon
0
119
Member Avatar for savinki

why cant we use strcat without initialing first parameter? e.g. char *b = "a"; char *a; strcat(a,b);

Member Avatar for Radical Edward
0
91
Member Avatar for savinki

I want to split data in a string. The string will consist of several data. Before every element the length ofthe element will come. I want to exract data one by one. e.g. char * abc = "[length ]acsfdnhsjg[len]gvsdgdvheg[len]efgwetrge"; can someone help me!!!!!!!

Member Avatar for Radical Edward
0
172
Member Avatar for savinki
Member Avatar for ithelp
0
133
Member Avatar for savinki

how can I do this?? can someone help me [code] char * abc = "as,df,ert:we,rt,yu:ee,rr,tt"; Class x { char * a,*b,*c; } vector<x> vtr; I want to extract data from abc like, while(there is a ":") { x.a= as; x.b=df; x.c=ert; vtr.push_back(x); }[/code]

Member Avatar for Radical Edward
0
289
Member Avatar for savinki

I want to split a string into token depending on different delimiters. e.g. char * temp = "asfs:ggd,oper:eger,ropptujnsdn:hfhgw"; and firstly I want to split data by using "," (lets call a block). and then each block should again split using ":" and save each token's value. then finally I want …

Member Avatar for saandeep_jan
0
1K
Member Avatar for savinki

How can I type cast char* to a long value? e.g. char * abc ; long xyz; xyz = abc????

Member Avatar for Radical Edward
0
242
Member Avatar for savinki

Hi, I want to assign a char pointer value to enmerated value, to use in a switch statement. Given below is the code segment. I dont hv an idea how to convert and assign char pointer value to a enumerated value. Pls can someone help me to resolve this [code=cplusplus] …

Member Avatar for Duoas
0
163
Member Avatar for savinki

This is the code segment I hv written. But its compiling well. but it doest give expected output, for me.. I want to write a function to split a char array by taking "," as the delimeter. I m not splitting the array at once. I m doing it one …

Member Avatar for Agni
0
102
Member Avatar for savinki

i want to convert stringstream into a string type e.g. [code] void countParameters(stringstream p_InputDataToCount, unsigned int &counter, char Delimeter) { size_t found; //stringstream convert ( p_InputDataToCount ); //convert>> std::hex >> m_nCommandID; //I want to do somethong like this found=[COLOR="Red"]p_InputDataToCount[/COLOR].find_first_of(Delimeter); while (found!=string::npos) { counter++; found=[COLOR="red"]p_InputDataToCount.[/COLOR]find_first_of(',',found+1); } }[/code]

Member Avatar for vijayan121
0
168
Member Avatar for savinki

i m getting this error. but i couldnt identified where i have gone wrong. could someone explained, normally in which situations this type of error occurs. Error 1 error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>' c:\program files\microsoft visual studio 8\vc\include\sstream 513

Member Avatar for William Hemsworth
0
75
Member Avatar for savinki

In windows getline(,,) returns *this. And Errors are signaled by modifying the internal state flags e.g. eofbit, failbit, badbit. e.g. No characters were extracted -> then state flag = failbit I want to do erro handling to this. since this retuens pointer how can i do this. Can some one …

Member Avatar for Nick Evan
0
103
Member Avatar for savinki

We have a socket program written in standard c++. Could anyone tell me about what are the test cases i should do?

Member Avatar for Ancient Dragon
0
61
Member Avatar for savinki

I want to convert a character to hexadecimal value. and that value should be a unsigned char value. e.g. unsigned char a[16] = {0x00,0x44,...}; this is the code segment i wrote. but its not working properly. unsigned char a1= 'D'; unsigned char a[4] ; unsigned char temp[16]; sprintf((char *)a,"0x%02X",a1); cout<<a; …

Member Avatar for Narue
0
93
Member Avatar for savinki

i want to convert char array element into hexadecimal value. But the code i wrote is not giving the output as i expect. [code] unsigned char in[256]; void Text(const char *Buffer) { static char tempValue[256]; for(int i=0;i<=len;i++) { sprintf(&tempValue[i],"%02x", (unsigned char)Buffer[i]); in[i]=(unsigned char)tempValue[i]; cout<<"HexaValue"<<in[i]; } } [/code] this is not …

Member Avatar for Ancient Dragon
0
145

The End.