Search Results

Showing results 1 to 39 of 39
Search took 0.01 seconds.
Search: Posts Made By: 1o0oBhP ; Forum: C and child forums
Forum: C Apr 7th, 2005
Replies: 5
Views: 1,974
Posted By 1o0oBhP
You want to load them into a one dimension array really as then each array index represents a frame of animation. This could be done using windows functions quite easily (BitBlt function and the...
Forum: C Mar 23rd, 2005
Replies: 4
Views: 1,472
Posted By 1o0oBhP
ibmackin have you tried any code at all, if so post it. The forum rules say we dont do homework for you, but we will have a go at fixing mistakes in homework you HAVE ALREADY DONE! |:)
Forum: C Mar 20th, 2005
Replies: 4
Views: 3,820
Posted By 1o0oBhP
Sorry for the late reply Ive been away at uni working hard! As for drawing the calendar why not have a nested loop to draw the whole lot?



char days[] = { "S", "M", "T", "W", "T", "F", "S" };...
Forum: C Mar 20th, 2005
Replies: 3
Views: 2,584
Posted By 1o0oBhP
Sorry I re-read the question. Your instructor is asking you to do a 'fake 3d' lighting effect (I was going to show you a 'real' techniqe!). He / She has said that colour must fade depending on...
Forum: C Mar 20th, 2005
Replies: 3
Views: 2,584
Posted By 1o0oBhP
Well for a start to make an ellipse appear like a ball you need to make a CIRCLE not an ellipse, then depending on the angle of the light you need to do some VERY basic lighting algorithms ASSUMING...
Forum: C Mar 20th, 2005
Replies: 4
Views: 1,911
Posted By 1o0oBhP
from google

http://www.computing.net/programming/wwwboard/forum/12045.html



#include <stdio.h>

if(remove("myfile.txt") == -1)
Forum: C Mar 20th, 2005
Replies: 1
Views: 2,118
Posted By 1o0oBhP
What exact problem are you having at the moment with it? If you generate random numbers 1 - 13 to generate random cards all you need to do is have a seperate fields to store the value and the ID in....
Forum: C Mar 16th, 2005
Replies: 4
Views: 3,820
Posted By 1o0oBhP
Well looping would be a simple way to draw it! Does this have to be a console app? Many Win32 Functions are available for arranging text or characters at co-ordinates on a window....
Forum: C Feb 7th, 2005
Replies: 5
Views: 2,326
Posted By 1o0oBhP
I would suggest looking at Projectile physics if you wanted to code that! post back any attempts though! :)
Forum: C Feb 3rd, 2005
Replies: 6
Views: 2,095
Posted By 1o0oBhP
this site has online tutorials, just look in the c/c++ tutorials forum....
Forum: C Jan 31st, 2005
Replies: 2
Views: 6,834
Posted By 1o0oBhP
have you got any more code as if there is a problem you might need to show us the whole program. there is a good fstream tutorial on the site that can solve problems... :) Im not entirely sure but my...
Forum: C Jan 27th, 2005
Replies: 5
Views: 3,966
Posted By 1o0oBhP
What GFX lib for a start? BTW a triangle is a LONG header if you're making your own without and GFX lib help, and you WONT get it done in a day, trust me, ive made many :)
Forum: C Jan 27th, 2005
Replies: 7
Views: 2,718
Posted By 1o0oBhP
Read the code CAREFULLY. Something MUST be defined before it is used... Hence list.h needs some re-arrangement:


struct node { itemType item; link next; }; // Define node first
typedef struct...
Forum: C Jan 25th, 2005
Replies: 8
Views: 2,516
Posted By 1o0oBhP
Im not too keen on the one-size matrix [1024][1024]. It would make more sense to get the Bitmap's width and Height from the BMP file. Doing a google search for the file fomat (Bitmap File format)...
Forum: C Jan 20th, 2005
Replies: 8
Views: 2,516
Posted By 1o0oBhP
Have you successfully read in the image yet? That is the first hurdle. Then the extrapolation should be clear.
Forum: C Jan 8th, 2005
Replies: 3
Views: 4,355
Posted By 1o0oBhP
use a while loop checking if q is pressed. You havent actually used char, and are asking the user to input a letter or number, but only grabbing the number! I would convert to c++ and use iostream, I...
Forum: C Jan 8th, 2005
Replies: 2
Views: 20,629
Posted By 1o0oBhP
from your previous post (looking at the post times you must of missed this one otherwise you wouldnt post again!)


#include <iostream>
using namespace std;

int main(void)
{
int...
Forum: C Jan 8th, 2005
Replies: 11
Views: 103,425
Posted By 1o0oBhP
and im impressed with the **, you dont see that often :)
Forum: C Jan 8th, 2005
Replies: 11
Views: 103,425
Posted By 1o0oBhP
nice1 harshchandra! I have a snippet with a doubly linked list if you are interested!
Forum: C Jan 8th, 2005
Replies: 7
Views: 6,297
Posted By 1o0oBhP
you forgot the [/code] tag to make it display properly - so the code has many typos. Nevertheless i will help by creating a c++ program to do the same, try and spot the similarities to yours:

...
Forum: C Jan 6th, 2005
Replies: 7
Views: 4,712
Posted By 1o0oBhP
Put some really obvious parameters in (like make an element of image[x][y] = 4 and the result should be 2) and check the results? if it compiles that is the only way to check that the output is...
Forum: C Jan 1st, 2005
Replies: 8
Views: 13,511
Posted By 1o0oBhP
int *array;

array = (int*)new int[size]; // re-size
delete [] array; // when you finish with it


This is another easy way to make arrays of any size. Easier but not as powerful as a linked...
Forum: C Dec 26th, 2004
Replies: 3
Views: 1,515
Posted By 1o0oBhP
on the surface of it - it may be worth turning this over to the computer science forum to get an idea and then posting code problems back here :)
Forum: C Dec 20th, 2004
Replies: 3
Solved: Template class
Views: 2,264
Posted By 1o0oBhP
OIC!! the complex class is being initialised with no params when you use it like that - so you need to code a default constructor (one with no parameters). This should be standard practice but try...
Forum: C Dec 17th, 2004
Replies: 3
Solved: Template class
Views: 2,264
Posted By 1o0oBhP
what error is it showing as the code looks fine to me
Forum: C Dec 17th, 2004
Replies: 16
Views: 12,546
Posted By 1o0oBhP
seems like a lot of solutions here. hope that they are useful fakhre, i tested mine a lot and still no errors but i didnt know about the pow function, it could simplify mine a bit (remove power,...
Forum: C Dec 16th, 2004
Replies: 3
Views: 3,852
Posted By 1o0oBhP
Lets say you want to delete record 3 in a 10 record file:


int rec_to_delete = 2; // record 3 is index 2

for(int i = 0; i < 9; i++)
{
if(i != rec_to_delete)
{
// copy...
Forum: C Dec 16th, 2004
Replies: 16
Views: 12,546
Posted By 1o0oBhP
dave havent you just done DECIMAL to BINARY?? i thought we were doing BINARY to DECIMAL ???
Forum: C Dec 15th, 2004
Replies: 16
Views: 12,546
Posted By 1o0oBhP
im not sure what constraints you have on how to code it but heres what i came up with after a few minutes of head scratching. it has a for and do-while and even stores the binary number if you need...
Forum: C Dec 15th, 2004
Replies: 14
Views: 7,622
Posted By 1o0oBhP
cheers vega, i overcame the problem in the end anyway using an html logfile -> easier to read and break up into tables for arrays ect...

What is the problem (if any) with the frequency counter??...
Forum: C Dec 15th, 2004
Replies: 14
Views: 7,622
Posted By 1o0oBhP
fair enough. Im used to Programming in VB (6 years and before i learned c++) where you can observe variables at run time (ie wats in the string). however my c++ IDE doesnt.... so i dont know what is...
Forum: C Dec 15th, 2004
Replies: 14
Views: 7,622
Posted By 1o0oBhP
something like this


char text[256] = "1o0oBhP";


Most of the time its ok and the rest is blank. Occasionally its not and causes errors when you use strcat and other string functions. I...
Forum: C Dec 15th, 2004
Replies: 14
Views: 7,622
Posted By 1o0oBhP
Sorry its just a habit. Have done it with character strings and had junk data in each one. Playing it safe.



News to me, i always use brackets, then i dont forget. :)#

BTW: I tried your code...
Forum: C Dec 15th, 2004
Replies: 14
Views: 7,622
Posted By 1o0oBhP
sizeof letters: needs brackets around letters, but that could be the absence of code tags (use [xCODE]paste code here[x/CODE] --> remove x's wen u post: i put that in so u could see the tags!!)
when...
Forum: C Dec 15th, 2004
Replies: 25
Views: 32,300
Posted By 1o0oBhP
whilst we're on the subject is there a lib function for integer to string ect....
Forum: C Dec 14th, 2004
Replies: 5
Views: 21,240
Posted By 1o0oBhP
does the code work and compile? as i cant see either how a char can be used as a subscript.... unless... i do have an idea as it is passing a char, and the array is an array referring to the char set...
Forum: C Dec 14th, 2004
Replies: 2
Views: 1,572
Posted By 1o0oBhP
IMHO ive never HAD to use the const keyword, though i see it in a LOT of & and * parameters so it can only be a good thing. in basic terms it is probably ESSENTIAL for the & operator as that will...
Forum: C Dec 14th, 2004
Replies: 1
Views: 1,460
Posted By 1o0oBhP
if you have two strings you can use strcmp(char*str1, char*str2) which is a standard function. the cmd error is probably from 'bad data', ie when you initialised the database you have got 4 entries...
Forum: C Dec 4th, 2004
Replies: 1
Views: 1,938
Posted By 1o0oBhP
I have done a bit of physics programming and linked lists before. Anyone want me to post a tutorial on it???

would be about single / doubley linked lists, a bit about quick searching and simple...
Showing results 1 to 39 of 39

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC