Well, if you only have to do certain words you can read them in and use strcmp() to compare them to a list of words. Then when you find which ones match print out the correct definitions.
Type: Posts; User: Pressure
Well, if you only have to do certain words you can read them in and use strcmp() to compare them to a list of words. Then when you find which ones match print out the correct definitions.
You should learn to read errors and know what they mean. The explinations are pretty straight forward. I ran your code through my compiler and here are all the errors I got:
test.c:24: warning:...
I've owned my current computer for about 2 and a half years and I'm looking to get a couple more out of it. Recently though I've been experiencing graphical problems in my games. It doesn't happen...
That code is a bloody mess. Use some tabs to space everything and include functions so we can see the rest of the code.
I heard they used Merge Sort. At least that's what I'm told, I pay someone to go to the lectures for me. :p
All of that was made because it didn't run in my compiler the way he had it set. The reading in single characters was skipping past the loop for me and that was that only way I could get it to stay...
Hey, I went over your program and made a few corrections. I'm going to bold them in the code. They're pretty simple mistakes but if you have any questions about what I did or why feel free to ask. I...
#include <stdio.h>
#include <ctype.h>
int main(void){
int c;
while ((c=getchar()) != EOF){
if( !isspace(c))
putchar(c);
}
Just out of curiousity, why do you need that kind of percision?
Are you using File I/O or not? You say you think you need to but if you don't need there are easier ways.
Show me the contents of the input file and I can try to fix it.
It probably means it just wants you to ask the user for input from the keyboard. The code for that would look something like:
printf("Enter the price: ");
scanf("%f", &comic.price);
...
Ouch, never ever ever ever void main. Here's my version of the code of what I think you're trying to do. You never posted a readata() function so I'm assuming it's there somewhere. I took it out due...
Ok, thanks for the help I got the program working. I know the code is probably poor and a jumbled mess but atleast it works. As for looking for "QUERY_OVER" I forgot to post that in my first post....
I need help with my program. It's a search engine just like the guy's in the thread before mine. Here's the code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
FILE *infile;...
That doesn't seem to be working either or I'm doing it terribly wrong lol. Here's the new updated code:
void findmaze(char symbol[LENGTH][LENGTH])
{
int row, col;
for(row = 0; row <...
I've run into a bit of a problem. It's either something wrong with how I'm reading in the characters or how I'm printing them. Here's the code:
void findmaze(char symbol[LENGTH][LENGTH])
{...
It wasn't the code I was having problems with just the concept but I understand it now.
Alright thanks, I'll write the code to see if I run into any problems.
I'm just learning the concept of stacks and I'm having a bit of trouble trying to figure out how to use them. I understand that you push values into the stack and you pop the upper most one. It's...
Ah, now I understand. If I have anymore problems with the program in the future I'll post it here. Thanks for the help so far :).
EDIT: I just saw the post above let me try that.
EDIT: It worked, you were right. Why do you only go up to the N-1?
Here's the whole thing so far:
#include <stdio.h>
#include <string.h>
struct students
{
char name[30];
int grade[5];
Ok, I've run into another problem that's really weird. I'm now trying to sort the names alphabetically. Here's the code I used:
void sort_names(struct students student[], int num_students, int...
Ah, so that's where that error was coming from. I thought it had something to do with the way I was trying to read in the strings. After that I was able to figure out what I wanted to do. At first...