Search:

Type: Posts; User: Chems

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    778

    Comparing input with " ' " ?

    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...
  2. Replies
    8
    Views
    1,635

    First off, thanks for putting me onto fgets, it...

    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...
  3. Replies
    8
    Views
    1,635

    Thank Adat, very informative. I will try to stop...

    Thank Adat, very informative. I will try to stop using global variables from now on!
  4. Replies
    8
    Views
    1,635

    Thank for all that pointers. Sorry the...

    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...
  5. Replies
    8
    Views
    1,635

    General How to go about this question?

    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:
    ...
  6. Replies
    5
    Views
    1,138

    Sorry about that!

    Sorry about that!
  7. Replies
    5
    Views
    1,138

    Thanks for that Billy, so much simpler than what...

    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...
  8. Replies
    5
    Views
    1,138

    Stuck with Strings!

    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...
  9. Replies
    4
    Views
    3,847

    Thank for the book link, I'll be sure to get a...

    Thank for the book link, I'll be sure to get a copy.

    The file just looks like:

    2
    13
    546
    32
    23
    5
  10. Replies
    4
    Views
    3,847

    Text > Sort > Array. AWK Program

    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...
  11. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    I love you. I rewrote the code today with...

    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!
  12. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    After playing around with this for 4 days I've...

    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...
  13. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    My latest hash up. Still not getting any pretty...

    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;...
  14. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    Heres the updated code. I'm sure the maths is...

    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...
  15. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    #include int it; double r, i;...

    #include <stdio.h>

    int it;
    double r, i;
    double r2, i2;
    double tmp;
    double x, y;
    int column = 1;
    int row = 1;
  16. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    So to make it a bit more clear. I have the...

    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...
  17. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    Thanks for the reply. Thats sort of what I'm...

    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...
  18. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    After a bit more google searching I'm thinking I...

    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...
  19. Thread: MandelBrot

    by Chems
    Replies
    16
    Views
    4,324

    MandelBrot

    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...
  20. Replies
    3
    Views
    2,403

    Heres the code, a simple program to change...

    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...
  21. Replies
    3
    Views
    2,403

    Newbie Needs Help with %f decimals

    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...
Results 1 to 21 of 23