I want to run a simple if statement:
if(ch == " ' ");
Of course this doesn't work I thought it would be simple just to declare it as its ASCII characters !.
I'm sure theres a simple way...
Type: Posts; User: Chems
I want to run a simple if statement:
if(ch == " ' ");
Of course this doesn't work I thought it would be simple just to declare it as its ASCII characters !.
I'm sure theres a simple way...
First off, thanks for putting me onto fgets, it so easy to use a few of the strings library functions to check for all the things that were such a hassle before.
I'm nearly there now but I want to...
Thank Adat, very informative. I will try to stop using global variables from now on!
Thank for all that pointers.
Sorry the indentation is so bad, its not normally its just been a case of deleting and restarting and I work in Notepad++ then copy it over to the server via Putty and...
I'm working on this code that I'm hoping can take a C file and rearrange bad indentation, ignore comments, remove whitespace etc to get it to an agreed format.
Heres what I have so far:
...
Sorry about that!
Thanks for that Billy, so much simpler than what I was trying to implement.
To make a tweak on it I want to be able to identify the phrase as the loop is running using the same method. So I've...
Hi Guys,
Been getting on well with C till now.
I'm trying to take an input file, read it character by character, along the way I want to compare the character stream so I can compare a phrase...
Thank for the book link, I'll be sure to get a copy.
The file just looks like:
2
13
546
32
23
5
I'm having problem with an bit of school work.
I'm meant to be getting a text file, sorting it into descending number order and then loading it into an array. All within a shell script. This is...
I love you.
I rewrote the code today with for loops, which are much better for this type of thing.
Thanks for all your help, its massively appreciated!
After playing around with this for 4 days I've got to this point. I'm 100% sure it should print out the mandlebrot but it doesn't. The column and row index increases nicely and the counts work to...
My latest hash up. Still not getting any pretty pictures. I much prefer this way or running the loops, seems less convoluted than before, so thank you for that.
#include <stdio.h>
int it;...
Heres the updated code.
I'm sure the maths is right now thanks to you, but I think perhaps the way I'm going about giving it the columns and rows is wrong? At the moment they both start at 0 and...
#include <stdio.h>
int it;
double r, i;
double r2, i2;
double tmp;
double x, y;
int column = 1;
int row = 1;
So to make it a bit more clear.
I have the mandlebrot code, and I have to give it the column positions for a set amount of character that will be 50 characters wide by 30 lines high. These have to...
Thanks for the reply.
Thats sort of what I'm after. I'm been asked to work out the column postion and row position. There must be a simple bit of maths to do this, as were only in our first few...
After a bit more google searching I'm thinking I should be looking at pointers and there use with rows and columns.
I need to be able to give an x and y coordinate to each value within a grid...
Hi,
I have an assignment to make a simple mandelbrot program. They have kindly given us the code to get started with and all we have to do is assign values a column position.
I'm a bit lost...
Heres the code, a simple program to change cmtoinch. I'm trying to keep it simple simply cause I don't know enough to make it complicated! Once the value goes over 12 inchs it should show 1 foot 12...
Hi all,
Just started learning C and am struggling with showing the results I want.
I have the number 3.983723 and I want to display just the 98 with no number before or decimal place.
The...