thats all you did? just put type void? hmm....... thanks for you trouble pal but maybe its my compiler...
Type: Posts; User: BobDole11
thats all you did? just put type void? hmm....... thanks for you trouble pal but maybe its my compiler...
yeah neither of them, and fixed the fclose lol whoops. maybe it's just a random occurence can you try it in your compiler w/ fake .txt files. I will give you 5 dollars!!
That was just to check, and they are in the right directories, i have copied them everywhere..
#include<stdio.h>
#include"global.h"
#include<string.h>
/*print_array()*/
void print_array(int ia[][NUM_COLUMN], int row, int column);
read_array(FILE *fp, FILE *fp2, char string1[], char...
what is the function for searching within an argument?
OK, can you help me with error outputs for unrecognized arguments. How can i get it so if the user doesn't type the right argument types(.txt file) it will print an error. I have a switch, but what...
Writing the c code is where I have trouble.
the command line arguments should look like
program.exe filea.txt fileb.txt
the number are stored in the files in rows and columns separated by...
I need some help getting started multiplying matrices.
This is the pseudocode i am given.
int main(int argc, char **argv) {
step 1: check if the command line arguments are passed correctly...
There you go Chotta man i owe you a big one thanks a lot
void print_all_divisor(int number) {
int divis;
if (number <=0) return 0;
if ((number%(number-1)) == 0)
{ divis = number-1;
printf("%d", divis);
return print_all_divisor(number-1);
}...
I am writing a recursive function to print all the divisor's of a number including 1 and itself.
I am using a function
print_recur(int number)
and inside that I am using
number % (number -...
I'm just going to tell the user to use _ for spaces and use scanf, thanks for your help elysia
The last bit of code it says to replace gets, I dont understand how to implement my code like that
I don't understand the link
Well, can anyone help me use gets(), this isn't an actual program for a business, just a hw assignment which calls for gets()
so i would replace
gets(name);
with
scanf("%s", &name);
getchar();
What does that do?
Okay, so in this program I have to read a string of characters then write that into a file. The max characters it can be is 20. Anyway, the problem I have is that when I use scanf() you can't enter...
Thanks a lot, I was having trouble understanding the code. Can you clarify a few things for me too?
When it opens the file it always creates a new one or deletes the old one so I lose the data,...
Here is the psuedocode my teacher gave us.
void list(FILE *fp) {
/* move the file pointer to the beginning using fseek() */
get a line using fgets()
print the line to the console using puts()...
Alright, thanks man
Okay, so i changed the %d's to %f's in the instances where I use 3.14159, but how would i do it so you can input a whole number integer or a decimal?
*question answered*