473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to convert std::string to DWORD

i need help to convert this:

Expand|Select|Wrap|Line Numbers
  1. char Pointer[255];
  2.  
  3. GetPrivateProfileString("GENERAL","PointerName",NULL, Pointer, 254,"./Settings.ini");
  4.  
after i read the value of the setting file i can't convert it to DWORD, need help with this


thx in advance

//BoneKeeper
May 6 '10 #1
3 6965
YarrOfDoom
1,247 Expert 1GB
I might be missing something here, but I feel I should point out that DWORD is an integer type, not a string type.
More info here.
May 6 '10 #2
Banfa
9,065 Expert Mod 8TB
You don't have a std::string you have an array of char (presumably zero terminated.

If GetPrivateprofileInt doesn't work for you try atoi.
May 7 '10 #3
yeah i solved it ^^

Expand|Select|Wrap|Line Numbers
  1.  
  2. DWORD dPointer = GetPrivateProfileInt("GENERAL","PointerName", NULL,"./Settings.ini");
  3.  
what i missed when i read was that the read function was a string and not a int ^^
May 8 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Khuong Dinh Pham | last post by:
I have the contents of an image of type std::string. How can I make a CxImage object with this type. The parameters to CxImage is: CxImage(byte* data, DWORD size) Thx in advance
10
by: farseer | last post by:
How can i do this? i'd like to call the following code: .... string url = <my urld>; TCHAR* urlParams = GetParams( ); url.append( (char * ) urlParams ); GotoURL( ( LPCTSTR ) url ); ...
2
by: Abhishek | last post by:
how to do convert a std::string to LPTSTR (chat *) datatype regards Abhishek
10
by: Jeffrey Walton | last post by:
Hi All, I've done a little homework (I've read responses to similar from P.J. Plauger and Dietmar Kuehl), and wanted to verify with the Group. Below is what I am performing (Stroustrup's...
3
by: timor.super | last post by:
Hi group, how to convert a string to a vector of unsigned char ? I used to iterate trough the string to set the vector, but I think this is not the best way to do this. I'm a beginner with the...
3
by: rsennat | last post by:
Hi, Converting enum to strings is simple. Just we can use the enum as the i ndex to get the string from an array of strings. But how do I convert string to enum. Should I need to compare with...
2
by: Man4ish | last post by:
How can we convert std::string into basic string?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.