I think I have to the code right cuz it all compiles perfectly except when its done running, and I go to my documents, I dont see my directory...
#include <iostream>
#include <windows.h>
#include <winuser.h>
#include <stdlib.h>
#include <string>
#include <stdio.h>
#include "stdafx.h"
#include <lm.h>
#include <assert.h>
#include <fstream>
#include <algorithm>
#include <shlobj.h>
#include <direct.h>
using namespace std;
int main()
{
char user[100]="";
DWORD size=100;
GetUserName(user,&size);
char path[255]="";
sprintf(path,"C:\\Document And Settings\\%s\\My Documents\\",user);
string str;
string base="C:\\Document And Settings\\user\\My Documents\\OMG";
str=base;
str.replace(25,4,user,0,100);
LPSECURITY_ATTRIBUTES attr;
attr = NULL;
CreateDirectory(str.c_str(), attr);
cout << "\nFolder Created!\n";
}