fprintf(fp,"%c", ch);
thanks, the code is now fixed
tbh I haven't got an idea what fprintf does before posting this thread.
Type: Posts; User: BinaryProgamer
fprintf(fp,"%c", ch);
thanks, the code is now fixed
tbh I haven't got an idea what fprintf does before posting this thread.
The code I want checked is this (see first post)
int ch;
...
while (ch != 'y'){
ch = _getch();
fprintf(fp, ch);
}
The error is that once i typed anything to the console, a error message displays in visual studio
"Application has stopped working"
You are right about EOF. How about pressing any character other than EOF.
I made a similar program to make you get an idea what im trying to do.
#define _CRT_SECURE_NO_WARNINGS
#include...
This is basically my attempt to write to a file in real time without hitting the enter key. However there is an error occuring. This is written in visual studio 2015.
The functionality of this...
So I have one linux machine and one windows 8.1 machine connected on a LAN.
So i want to use GCC from windows. Problem is, i have zero experience with vim and have a little background in linux...
I did what you told me and the code now works. Can you check if what i did was the right thing?
parmdcl.c
...
int compare(const void *s, const void *t)
{
char **chs;
char **cht;
Problem
Answer:
main.c
#include "extern.h"
#include <string.h>
#include <ctype.h>
This is the code i was following (Tondo's Book)
//main.c
#include <stdio.h>
#include <ctype.h>
#define NUMERIC 1
#define DECR 2