thx i did try to have a look but obviously didnt look to hard
Type: Posts; User: a1dutch
thx i did try to have a look but obviously didnt look to hard
this could either be done in c++ or c, how do i go about creating an exe program that will call another program stored on my computer
e.g. c.exe to call (javaw - jar test.jar)
javaw is set...
cheers guys but it well sorted by now, going back the the != and < issue, as long as you are starting at 0 and incrememting by one then != is fine, if the loop was incrementing by two then obviously...
sorted
how do i initililze this rect (RECT collision[1][4];) array staticly
one more question if i could, not on the subject of arrays but RECTs.
if a RECT is no initialised are the values 0 as default?
is it possible to store ?
array[32][3] = null;
array[32][4] =...
cheers man ur a star
and by the way != 5 is exactly the same as < 6
i always prefer using != to <
thanks again
sorry im maybe not explaining propperly, il explain again.
i need to pass an array of RECT's to a function so that each can be checked
//create array
RECT array[32][5];
now im confused with two answers that have been given. what im doing is writing a basic computer game so freeing up memory is not important. i have 32 rectangles arrays which each can have further...
arrays in c are so more complicated than java, i wonder if someone could help
how do i create an array of array of RECTS like below
e.g.
array
cheers magos, the idea of the macro looks good i might give that a go when i get it workin as it is now
na that would look terrible and would be to hard to manage, would of been better having doing it like
source[0] = {1, 19, 61, 40} but the other way works now and is fine
cheers anyway
cheers thanks
lookng for a bit of help with a bit of my game im creating, i need to create an array of rectngles (RECT)'s but i dont know how to im a java programmer just doing a bit of c++.
this is what i have...
i was just being stupid counting 0 as first and only putiing 4 not 5. realize what ive done now but cheers for ur help
sorry i did try that but i think i found out what the problem was, am i right in thinking that chars dont start counting at 0 like arrays do? because i made code char[4] (assuming 0 1 2 3 4,...
still having problems with this
#include <stdio.h>
#include <string.h>
struct play
{
soz it was just a slip of the finger, i know fscanf does not count whitespaces but it should still let me split it up shouldnt it?
The output was produced using a simple printf
...
scanf never seems to work properly for me when using strings, code below and sample input file also.
int i = 0;
FILE *file;
file = fopen("playlist", "r");
cheers for that, theres summit about books though that are way better than online guides. you can leave it on your desk and flick through the pages when u need to and not have to go trawling through...
well ive done java for 2 years at uni now, and we have to do C programming as were doing sockets and stuff. The stuff we do is all done on the command line in unix, no proper gui's or anything.
...
Can any recomend a better book for programming in C other than The C Programming Language, 2nd Edition (K&R) 1998.
Ive studied Java before and now moving into C and C++ after that hopefully.
...
mate i tried changing that code u posted to read the password into another array,but it just aint having it, heres what ive put
#include <stdio.h>
#include <string.h>
int main(void)
{
mate ur a legend, cheers. does sscanf require u to check the result is ok?
e.g as in the code
if ( sscanf(line, "%9s", user[i]) == 1 )
cos if i take it out of the if statement it...
dave i use sscanf as the original text file is user then whitespace(of no fixed length) then password
n290865 password
n456832 passwords
n297236 password