Click here to Skip to main content
15,901,368 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: socket:send integer Pin
Richard MacCutchan6-Nov-15 4:17
mveRichard MacCutchan6-Nov-15 4:17 
AnswerRe: socket:send integer Pin
Jochen Arndt1-Nov-15 21:07
professionalJochen Arndt1-Nov-15 21:07 
GeneralRe: socket:send integer Pin
Member 114755496-Nov-15 4:16
Member 114755496-Nov-15 4:16 
Questionuint32_t result of uint16_t addition Pin
elelont230-Oct-15 3:44
elelont230-Oct-15 3:44 
AnswerRe: uint32_t result of uint16_t addition Pin
Jochen Arndt30-Oct-15 4:00
professionalJochen Arndt30-Oct-15 4:00 
AnswerRe: uint32_t result of uint16_t addition Pin
jeron130-Oct-15 4:08
jeron130-Oct-15 4:08 
AnswerRe: uint32_t result of uint16_t addition Pin
CPallini30-Oct-15 4:24
mveCPallini30-Oct-15 4:24 
AnswerRe: uint32_t result of uint16_t addition Pin
R. Erasmus3-Nov-15 23:48
R. Erasmus3-Nov-15 23:48 
QuestionChange menu item text Pin
_Flaviu29-Oct-15 3:25
_Flaviu29-Oct-15 3:25 
AnswerRe: Change menu item text Pin
Richard MacCutchan29-Oct-15 5:20
mveRichard MacCutchan29-Oct-15 5:20 
GeneralRe: Change menu item text Pin
_Flaviu5-Nov-15 1:29
_Flaviu5-Nov-15 1:29 
GeneralRe: Change menu item text Pin
Richard MacCutchan5-Nov-15 5:32
mveRichard MacCutchan5-Nov-15 5:32 
GeneralRe: Change menu item text Pin
_Flaviu5-Nov-15 21:14
_Flaviu5-Nov-15 21:14 
GeneralRe: Change menu item text Pin
Richard MacCutchan5-Nov-15 23:20
mveRichard MacCutchan5-Nov-15 23:20 
Questionappending to file Pin
Member 1208455926-Oct-15 18:56
Member 1208455926-Oct-15 18:56 
AnswerRe: appending to file Pin
Richard MacCutchan26-Oct-15 22:32
mveRichard MacCutchan26-Oct-15 22:32 
QuestionRe: appending to file Pin
David Crow27-Oct-15 3:53
David Crow27-Oct-15 3:53 
Questionhow do you create a gamelogfile in c using program secure shell Pin
Member 1208455924-Oct-15 14:24
Member 1208455924-Oct-15 14:24 
AnswerRe: how do you create a gamelogfile in c using program secure shell Pin
Richard Andrew x6424-Oct-15 16:24
professionalRichard Andrew x6424-Oct-15 16:24 
AnswerRe: how do you create a gamelogfile in c using program secure shell Pin
Richard MacCutchan24-Oct-15 21:51
mveRichard MacCutchan24-Oct-15 21:51 
GeneralRe: how do you create a gamelogfile in c using program secure shell Pin
Member 1208455925-Oct-15 4:27
Member 1208455925-Oct-15 4:27 
GeneralRe: how do you create a gamelogfile in c using program secure shell Pin
Richard MacCutchan25-Oct-15 4:35
mveRichard MacCutchan25-Oct-15 4:35 
GeneralRe: how do you create a gamelogfile in c using program secure shell Pin
Member 1208455925-Oct-15 10:32
Member 1208455925-Oct-15 10:32 
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main (void){
FILE* gamein;
int numIn=0;
int row=0;
int column=0;
float Use=0;


int gameinput_array[5][5];

//output

for(row =0; row<5; row++){
for(column=0; column<5; column++)
fscanf(gamein, "%d", &numIn); //have two fscanf's 1st
gameinput_array[row][column]=numIn;
}
//

gamein = fopen("gameinput", "r");

while((fscanf(gamein, "%d", &numIn))==1) // 2nd
printf("%d", numIn);

char gamelog_file[30];
FILE* gamelog;
printf("Enter Your User Name here\n");
scanf("%s", &gamelog_file);

//gamelog=fopen(gamelog_file,"a");//append



return 0;
}
NOW IM DRAGING BORAD INFO FORM gameinput FILE* WHICH HAS JUST LINES OF 0'S AND 1'S 5*5 GRID

NEED TO KNOW ABOUT THE FSCANF'S, WHETHER THEY ARE CORRECT OR NOT

WHEN THIS CODE COMPILES I GET SEGMENTATION FAULT BUT IT DOES COMPILE

THANKS IF YOU CAN HELP
QuestionRe: how do you create a gamelogfile in c using program secure shell Pin
David Crow25-Oct-15 15:12
David Crow25-Oct-15 15:12 
AnswerRe: how do you create a gamelogfile in c using program secure shell Pin
Member 1208455925-Oct-15 15:52
Member 1208455925-Oct-15 15:52 

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.