J
James DeClerk
Hi everyone.
I have a guid that's in string format. I would like to convert it to a
GUID. I'm doing this on the unix platform, so it will apply to only to
GCC/G++.
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
typedef struct _GUID
{
unsigned long l;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} GUID;
int main() {
GUID g;
//String is in hex format.
string s1 = ("7B41464136344430382D354132422D34");
//how do i get g = s1?!
}
Also, is working with GUIDs without using MFC/ATL/.NET a viable
strategy?
I have a guid that's in string format. I would like to convert it to a
GUID. I'm doing this on the unix platform, so it will apply to only to
GCC/G++.
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
typedef struct _GUID
{
unsigned long l;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} GUID;
int main() {
GUID g;
//String is in hex format.
string s1 = ("7B41464136344430382D354132422D34");
//how do i get g = s1?!
}
Also, is working with GUIDs without using MFC/ATL/.NET a viable
strategy?