Click here to Skip to main content
15,884,715 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Using Alternate Memory Heaps Pin
Richard MacCutchan19-Aug-18 21:24
mveRichard MacCutchan19-Aug-18 21:24 
AnswerRe: Using Alternate Memory Heaps Pin
Daniel Pfeffer21-Aug-18 5:46
professionalDaniel Pfeffer21-Aug-18 5:46 
GeneralRe: Using Alternate Memory Heaps Pin
Richard Andrew x6421-Aug-18 12:08
professionalRichard Andrew x6421-Aug-18 12:08 
GeneralRe: Using Alternate Memory Heaps Pin
Daniel Pfeffer21-Aug-18 20:21
professionalDaniel Pfeffer21-Aug-18 20:21 
GeneralRe: Using Alternate Memory Heaps Pin
Richard Andrew x6422-Aug-18 0:39
professionalRichard Andrew x6422-Aug-18 0:39 
QuestionIterating over an indefinitely large number of concentric loops Pin
Anthony Appleyard16-Aug-18 1:54
Anthony Appleyard16-Aug-18 1:54 
AnswerRe: Iterating over an indefinitely large number of concentric loops Pin
Richard MacCutchan16-Aug-18 23:17
mveRichard MacCutchan16-Aug-18 23:17 
QuestionHow to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 1:18
Anthony Appleyard15-Aug-18 1:18 
I am trying to revive a program that I wrote in years 2001 to 2005 for my old Borland C++ 4.51 compiler. The library functions that its compiled programs called, always ran in the mode of a character = 8 bits, not 16 bits. As this program largely handles text, not numerical values, it will have to compile to run with char = 8 bytes everywhere. For example, in this section:

int rundialogbox(HWND wn, HINSTANCE I, char*name,
BOOL CALLBACK /*_export*/ proc(HWND db, UINT M, WPARAM S, LPARAM L)) {
DLGPROC dp = MakeProcInstance((DLGPROC)proc, I);
int i = DialogBox(I, name, wn, dp); FreeProcInstance(dp); return i;}

I had type mismatch error of the type char* :: WCHAR*, until in menu Project / Properties I set the character mode from Unicode to Not Set; then this section compiled OK.

Whereupon, the next section

void diprintf(HWND db,int c,char*fmt,...){
char C[256];
vsprintf(C,fmt,(&fmt)+1);
SetDlgItemText(db,c,C);
};

failed with this error:

1>faces.cpp(80): error C2664: 'int vsprintf(char *const ,const char *const ,va_list)': cannot convert argument 3 from 'char **' to 'va_list'
1> faces.cpp(80): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

I replaced `char C[256];` by `WCHAR C[256];`, and compilation error still happened.

Does my Visual C++ still have an 8-bit-char-mode set of library functions? If so, how to call them?

modified 15-Aug-18 7:28am.

AnswerRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Randor 15-Aug-18 2:05
professional Randor 15-Aug-18 2:05 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 2:49
Anthony Appleyard15-Aug-18 2:49 
SuggestionRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Randor 15-Aug-18 3:05
professional Randor 15-Aug-18 3:05 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Richard MacCutchan15-Aug-18 5:18
mveRichard MacCutchan15-Aug-18 5:18 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Anthony Appleyard15-Aug-18 5:54
Anthony Appleyard15-Aug-18 5:54 
JokeRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Randor 15-Aug-18 6:21
professional Randor 15-Aug-18 6:21 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Richard MacCutchan15-Aug-18 6:41
mveRichard MacCutchan15-Aug-18 6:41 
GeneralRe: How to get Visual C++ (2015 version) to work in "char = 8 bits" mode? Pin
Richard MacCutchan15-Aug-18 6:40
mveRichard MacCutchan15-Aug-18 6:40 
QuestionC++ Vector object question Pin
focusdoit14-Aug-18 15:12
focusdoit14-Aug-18 15:12 
AnswerRe: C++ Vector object question Pin
Richard MacCutchan14-Aug-18 20:41
mveRichard MacCutchan14-Aug-18 20:41 
AnswerRe: C++ Vector object question Pin
markkuk14-Aug-18 23:51
markkuk14-Aug-18 23:51 
GeneralRe: C++ Vector object question Pin
samzcs15-Aug-18 2:28
samzcs15-Aug-18 2:28 
GeneralRe: C++ Vector object question Pin
Richard MacCutchan15-Aug-18 2:38
mveRichard MacCutchan15-Aug-18 2:38 
GeneralRe: C++ Vector object question Pin
samzcs15-Aug-18 2:55
samzcs15-Aug-18 2:55 
GeneralRe: C++ Vector object question Pin
Richard MacCutchan15-Aug-18 4:29
mveRichard MacCutchan15-Aug-18 4:29 
GeneralRe: C++ Vector object question Pin
samzcs15-Aug-18 3:32
samzcs15-Aug-18 3:32 
GeneralRe: C++ Vector object question Pin
Richard MacCutchan15-Aug-18 4:33
mveRichard MacCutchan15-Aug-18 4:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.