Click here to Skip to main content

C / C++ / MFC

 
GeneralRe: Cannot access #include files – “permission denied” PinmvpRichard MacCutchan19-Jan-13 8:11 
GeneralRe: Cannot access #include files – “permission denied” PinmemberVaclav_Sal19-Jan-13 13:02 
GeneralRe: Cannot access #include files – “permission denied” PinmvpRichard MacCutchan19-Jan-13 22:26 
QuestionWriting a non-Windows program PinmemberAnthony Appleyard19-Jan-13 2:23 
One of the bygone useful features of the ancient days before DOS programming vanished, was ability, when I wanted to calculate something quickly, to quickly write a program where control started at the beginning and ran down the text like in a knitting pattern and and I did not have to catch Windows messages and events. A short example follows at the end of this message. Please, how can I use Visual C++ to write and run such a program, and how to run it? (I have Windows Vista).
 
#include <stdio.h>
#include <std.h>
int F; char s[256],*nl="\n";
void v(int i,int j){sprintf(s,"%1d,%-3d %c%c%c%c ",i,j,0xc0,j,i,0xc0);
    write(F,s,11);}
main(){int i,j; F=open("t$$",0x8002);
for(j=0;j<=84;j++) v(4,j); write(F,nl,1);
for(j=0;j<=34;j++) v(5,j); write(F,nl,1);
for(j=0;j<=234;j++) v(6,j); write(F,nl,1);
close(F);}

AnswerRe: Writing a non-Windows program PinmvpRichard MacCutchan19-Jan-13 2:35 
QuestionHow to get Visual C++ to use the char* forms of standard functions? PinmemberAnthony Appleyard19-Jan-13 2:15 
AnswerRe: How to get Visual C++ to use the char* forms of standard functions? PinmemberSajeeshCheviry19-Jan-13 2:29 
GeneralRe: How to get Visual C++ to use the char* forms of standard functions? PinmvpRichard MacCutchan19-Jan-13 2:34 
AnswerRe: How to get Visual C++ to use the char* forms of standard functions? PinmvpRichard MacCutchan19-Jan-13 2:33 
GeneralRe: How to get Visual C++ to use the char* forms of standard functions? PinmemberSajeeshCheviry19-Jan-13 2:37 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.150301.1 | Last Updated 3 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid