User Profile

Collapse

Profile Sidebar

Collapse
roflmfao
roflmfao
Last Activity: May 26 '11, 08:06 AM
Joined: Jun 24 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • roflmfao
    replied to GRAPH.h from "Algorithms in C"
    in C
    :)

    Ok, it now works to some extend. See the EDIT from post #1

    I can compile the whole thing, but can you help with the second code-snippet? Is this intended to be compiled along with the 6 files above, or replace one of them (it is basically a Graph implemented as adjacency list)

    I would just like to run these examples myself, but it won't work :/
    See more | Go to post

    Leave a comment:


  • roflmfao
    started a topic GRAPH.h from "Algorithms in C"
    in C

    GRAPH.h from "Algorithms in C"

    Hey, I recently bought "Algorithms in C" by Robert Sedgewick

    In his programms (Part 5) he refers to "graph.h"

    On the website, I found an ftp Server with those files on it:

    ftp://ftp.cs.princeton.edu/pub/cs226/map/c/

    Now, I downloaded graph.h, graph.c, point.h, point.c, pqindex.h, pqindex.c from there.

    I opened these in Dev-C++, and tried to compile "graph.c"...
    See more | Go to post

  • roflmfao
    replied to How to Turn Array of integers into image file
    in C
    Thanks

    Ok, will do, thanks. I found some .c file while googling, but wasn't sure what to make of it. Obviously, it wasn't what I needed. The -bmp should be quite simple, as I only need two colors, and no greytones :) So filesize should be small (but it isn't really an issue, there will never be more than one output file :)

    This can be closed/archived/whatever now.
    See more | Go to post

    Leave a comment:


  • roflmfao
    replied to How to Turn Array of integers into image file
    in C
    I thought there might be a header file I am unaware of, or some pre-written .c file including what I need. Anyways, it seems there isn't...

    Code:
    FILE* output = fopen("output.bmp", "wb");
    This correctly opens "output.bmp " in binary mode?...
    See more | Go to post

    Leave a comment:


  • roflmfao
    replied to How to Turn Array of integers into image file
    in C
    :)

    Thanks for that. I then take it there is no easier way to do this?
    See more | Go to post

    Leave a comment:


  • roflmfao
    started a topic How to Turn Array of integers into image file
    in C

    How to Turn Array of integers into image file

    For a project (homework), I need to manipulate an Array of integers (2D) so that only certain positions take the value 1, and all others take the value 0.

    The Array is 800x600 in size, but may vary depending on the instance.

    This works fine, the problem lies in the output:

    To make output more readable (800x600 Array, dumped into a text file, is annoying to check for errors), I would like to turn this into an...
    See more | Go to post
No activity results to display
Show More
Working...