- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 6
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Uni Student - Engineering
- Interests
- Music, Building / Designing, UT2K4, Doom III
- PC Specs
- 2.5 GHz Celeron 256 MB DDR SDRAM 30 GB Ultra ATA/100 HDD CD-RW/DVD ROM 14.1" XGA TFT LCD not…
229 Posted Topics
Re: ASCII ART TIME! dear oh dear this is what happens when you get a random code error at 2 in the morning and cant be bothered to fix it :) [CODE] /| -- -- -- /| /| -- / | - - - - - - / | / | … | |
Re: BCX is working well but seems to be complicating the code somewhat. a lot of the BCX code seems at first glance a bit unnessecary... an example came with DevC++ which is a bit shorter but uses a bitmap... | |
Re: looking good! there is a way to make it simpler with a function pointer but ill let u figure it out :) | |
Re: Hiya everyone! ive been posting for about a week (i think...) and just been getting used to using the site - thought i should say hello! My name's Chris and im a uni student studying Engineering, currently in my First year :) | |
Re: A 3d FPS Using a choice of DirectX 8 or software rendering... only got through 90% then gave up in the end as i have just started uni and dont have time to finish it. I also lost a bit after a serious error when messing about with asm code … | |
Re: [QUOTE]how can i make it where numbers can't repeat themselves[/QUOTE] one way is to track what numbers are generated and save them in an array for instance. then check back to see if it is already generated.... IMHO if you have a range of over 50 then the numbers are … | |
Re: Sorry to be picky Dijstra isnt the matrix algorithm with weights - it is primm's matrix algorithm :p | |
Re: [QUOTE]if you output abc123 to a text file you will see abc123 but in a binary file you may see only a bunch of black blocks if you use notepad [/QUOTE] are you confusing this with acutally writing hex ab c1 and 23 in binary? that will give strange chars. … | |
Re: nice1 harshchandra! I have a snippet with a doubly linked list if you are interested! | |
Re: Where is the original thread. I might be able to have a look... | |
Re: you get 5 gold rings. I put in a christmas tree | |
Re: looks like a cross between vb and c++ (or is that .net and c# these days????) looked a bit complicated after c++ reading logically and so nicely... | |
Re: 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 (256 chars) it may be a case … | |
Re: [CODE] int *array; array = (int*)new int[size]; // re-size delete [] array; // when you finish with it [/CODE] This is another easy way to make arrays of any size. Easier but not as powerful as a linked list - but STL (what vegaseat just used) could be even easier … | |
Re: if you sort it DESCENDING you can loop through the array subbing the element from the total sum, if the next element causes the result to fall below zero you skip it for example sum = 15 integers: 10, 4, 3, 1 we loop through and take 10 from 15 … | |
Re: I would also recommend DevC++, also DJGPP is useful if you want to program old VGA graphics. | |
Re: if you have more than one statement in the if/else block you need braces ( { } ) [CODE] { toss = 1 + rand() % 2; if(toss == 1 ) { cout << "Heads" << endl; passes = passes +2; } else { cout << "Tails" << endl; failure … | |
The RLE (Run length encoding) compression method compresses a file by writing repeated data as a byte containing the length, then a byte of the data itself. The 'real' RLE method involves writing control bytes. The first bit says whether the following data is compressed or uncompressed. The remaining bits … | |
Re: [QUOTE](1)I have problem in deleting a record from a file.[/QUOTE] Lets say you want to delete record 3 in a 10 record file: [CODE] int rec_to_delete = 2; // record 3 is index 2 for(int i = 0; i < 9; i++) { if(i != rec_to_delete) { // copy record … | |
Re: can you not right click and tell it to run as win95? ive had that option on programs under XP before..... Try running the game in DOS mode if it has one.... | |
Re: however if you want to create an object dynamically the new keyword / operator will call the constructor for the object, malloc wont! I have found more uses for new than malloc()... | |
Re: strcmp parameters are invalid like the compiler says! I would convert to using the std::string class found in <string> as it is much easier to use and has most of its operators overloaded so you can do things like: [CODE] using namespace std; string str1 = "This is a "; … | |
Re: median of a matrix? what is that? do you mean determinant? the fstream tutorial on the c/c++ tutorials forum will help with file IO. | |
![]() | Re: 1) easy one: ask user to input some text. write it back as an HTML website. you could add 'commands' to add images and set text formatting if you like. Easy if you use ANSI c++ string class/functions (in <string>). Reading the fstream tutorial in the c/c++ tutorials forum is … |
Re: Talk us through the gabor filter.... im sure if you explain it anyone can do a pseudocode for you and maybe a bit more.... :) | |
Re: Aside from those two snippets you can also find more info by searching the forum for the question - as this question gets asked a lot :) I remember from one thread you can get another 4 code solutions written by people replying to the thread! | |
![]() | Re: pointers are c++ most useful things and is what sets it aside from other languages. Just to name a few uses: Dynamic arrays Linked lists Memory management (eg. passing pointers rather than objects, alloc'ing memory ect..) Binary Trees and Heaps (great for gaming) Speed improvement (you can simplify code in … |
Re: [QUOTE]#include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <string.h> #include "graphics.h" #define ESC 0x1b void main () { srand(time(NULL)); int GraphDriver=0; GraphMode=0; initgraph (&GraphDriver ,&GraphMode, "", 640,480); char tempstring[80]; getch() ; } } [/QUOTE] Spotted a few errors (although i accept it is work in progress :) ): main … | |
Re: [QUOTE]In a circular linked list it's impossible to find items based on an index. After all, there is no starting point![/QUOTE] depends on how you code it! If you have a starting head node you can index from there | |
Re: it might have been confusion of namespaces? surely <stdio.h> should be <cstdio> for namespace std. and vega is right too, that macro needed to be global. only #ifdef / #ifndef / #endif can be in executable statement blocks (i think anyway, there may be others). For example [CODE] if(x == … | |
Re: Just a thought: [CODE] CLS row = 0 For y = 0 to 19 ' 20 rows For x = 0 to row print "x" ' i cant remember the code for adjacent text Next print " " 'new line row = row + 1 ' increment row Next [/CODE] … | |
Re: the code should be ANSI standard code to work on all compilers, and i DONT see any un-ANSI code! it should work on others, i have compiled DevC++ projects on MSVC++ Before without any problems | |
Without using cascading style sheets or more complicated methods it is easy to introduce coloured text into your HTML sites/documents. This is done by using the <font> tag and its options. In addition to this the <font> tag is more backwards-compatible than most other style commands. The way to do … | |
Log files are useful things. They are used in programs to display the values or variables or other useful information such as what the program is doing. This is useful is the program crashes at some point or is not behaving as it should. By writing values and events to … | |
An introduction to the Win32 GUI. The code creates a simple window that you can play with. Many parameters can be changed if you like! The unusual thing about windows apps is that rather than directly handling inputs (ie the position of the mouse / what control has focus ect...) … | |
A singly (sp) and a Doubly Linked list class to create linked lists. Can be used to make dynamic arrays and could also be templated to work with any data type (this is old code and i didnt know how to at the time). Has been extremely useful to me … | |
![]() | Re: Depends on what interface (if that is the word) the drives are. S-ATA drives I have heard to be faster, but can only have one device per channel. Hence HD on #1 DVD on #2 DVD2 on #3 EIDE drives can have master/slave on a channel but IMHO seem to … |
I have been studying Engineering at university now and have come across a language which is apprently an industry standard - MatLab. It is a scripting language very close to C at times yet comes with a vast selection of tool boxes and specialised functions for engineering. I wondered whether … | |
Re: anything i can enter? i only just joined! | |
Re: Who doesnt play them! CnC RA2/Generals/ZH DR2 (Old but good, needs a prequal) Counter-Strike Team Fortress (nt for a while though) Unreal Tournament 2004 Doom III - rarely, dont get much FPS on my laptop! Doom Collectors Edition, box set thing (I + II + Final + extra levs) Q3A … | |
| |
Re: [CODE]#include <cstdio> \\At the top cout << "Press enter to exit"; getchar(); return 0;[/CODE] This DOES work..... This sounds like a common error to me. In DevC++ MAKE SURE that if you are using console output (cout) or generally not using a window for display then make sure in "Project … | |
Re: any idea how to do it in other compilers, or do it i general?? i have devc++ and i believe the required code might be differeny... | |
Re: If you define the 'words' as string * max length or something where the word has a maximum length you can make it a public type and then the file problem becomes a case of reading / writing 'records' (the word public type) and getting the number of records from … | |
Re: Seeing as this thread is about timesaving what about inheritance? Its a good time saver especially for the masses intent on game creation. Say you make a class such as [CODE] class CBASE_ENTITY { // code here. this class would provide functions for 'things' that exist in the game }; … | |
Re: would like to visit USA, probably Florida! Been to the Dominican Republic (in the carribean) but spain/france have been my best holidays. Im from the UK btw. | |
Re: Which page was it? or was it all pages? did you check the activity lights on the DSL router/modem to see that you had transmission? |
The End.