skip to Main Content

Visual Studio Code – my c++ app don't run after i add this code

I add this code to my C++ app but I can't run the app anymore: void setclipbord(const char* szBuffer) { OpenClipboard(NULL); HGLOBAL hClipboardData = GlobalAlloc(GMEM_MOVEABLE, strlen(szBuffer) + 1); char* pchData = (char*)GlobalLock(hClipboardData); strcpy(pchData, szBuffer); GlobalUnlock(hClipboardData); EmptyClipboard(); SetClipboardData(CF_TEXT, hClipboardData); CloseClipboard(); }…

VIEW QUESTION

ConfigurationBuilder().AddJsonFile(path) says file not found but file exists

any hints as to why this throws a "configuration file was not found and is not optional" exception? string relative_path = "../../../../appsettings_global.json"; if (File.Exists(relative_path)) { IConfigurationRoot global_config = new ConfigurationBuilder().AddJsonFile(relative_path, false, true).Build(); global_settings = global_config.GetRequiredSection("Settings").Get<GLOBAL_SETTINGS>(); }

VIEW QUESTION
Back To Top
Search