Forum: C++ Apr 7th, 2005 |
| Replies: 3 Views: 4,247 Have an array of chars and draw it!
eg:
char array[] = { "+", "+", "+", "+", "+",
"+", "0", "+", "0", "+",
"+", "+", "^", "+",... |
Forum: C++ Apr 7th, 2005 |
| Replies: 3 Views: 4,247 Have an array of chars and draw it!
eg:
char array[] = { "+", "+", "+", "+", "+",
"+", "0", "+", "0", "+",
"+", "+", "^", "+", "+",
... |
Forum: C++ Mar 23rd, 2005 |
| Replies: 12 Views: 44,183 try substituting <cstdlib> in place of <stdlib.h> |
Forum: C++ Mar 23rd, 2005 |
| Replies: 12 Views: 44,183 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 |
Forum: C++ Mar 23rd, 2005 |
| Replies: 9 Views: 5,471 They only take up minute disk space and minimal ram on the html docs! You can always NOT provide a file, then nothing is drawn... |
Forum: C++ Mar 23rd, 2005 |
| Replies: 45 Views: 44,588 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()... |
Forum: C++ Mar 20th, 2005 |
| Replies: 3 Views: 2,849 or in full "std::vector", but there is still a danger that the struct name will cause errors. Easy just to do
namespace my_vector
{
struct vector // might as well class it
{
... |
Forum: C++ Mar 20th, 2005 |
| Replies: 1 Views: 4,275 Can you explain further and provide details? Is the image on a window? CursorPos sounds like a console function to me... |
Forum: C++ Mar 20th, 2005 |
| Replies: 54 Views: 79,587 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
class CBASE_ENTITY
{... |
Forum: C++ Mar 20th, 2005 |
| Replies: 11 Views: 23,552 I would also recommend DevC++, also DJGPP is useful if you want to program old VGA graphics. |
Forum: C++ Mar 20th, 2005 |
| Replies: 2 Views: 3,276 Another way might be to define two classes with everything private (-constructors) and put the other classes functions as friends? the use of the static keyword could help as static fields dont... |
Forum: C++ Mar 16th, 2005 |
| Replies: 1 Views: 5,062 not sure what is wrong there! However this code (untested) should work
#include <iostream> // std::cout
#include <string> // std::string
#include <cstdlib> // system
template <class t>... |
Forum: C++ Mar 16th, 2005 |
| Replies: 9 Views: 5,076 DevC++ doesnt have graphics.h with it, its a borland extension. iostream.h should work if not try #include <iostream> without the .h |
Forum: C++ Mar 5th, 2005 |
| Replies: 6 Views: 15,591 I thought <string.h> was part of the old c++ standard? |
Forum: C++ Mar 5th, 2005 |
| Replies: 8 Views: 75,118 Where is the original thread. I might be able to have a look... |
Forum: C++ Mar 5th, 2005 |
| Replies: 13 Views: 13,859 Lost times of how many times i have said this (it is posted 3 or 4 times ABOVE people!) but just to refresh...
THE MODE 13H CODE USES 16 BIT ASSEMBLY COMMANDS (16 bit interrupts is the problem)
... |
Forum: C++ Mar 5th, 2005 |
| Replies: 6 Views: 15,902 DevC++ using mingw32 compiler. I think its the other way round as most MS users I have seen have got all sorts of auto-generated things to adjust the code! The brush issue should work as... |
Forum: C++ Mar 5th, 2005 |
| Replies: 3 Views: 3,751 If you must use char * (c-style) strings then define them as
char *string1;
char *string2;
string1 = (char*) new char[length + 1]; // allocate memory for a string of a given length. the + 1 is... |
Forum: C++ Mar 5th, 2005 |
| Replies: 6 Views: 15,591 std::string also works well
ie
std::string str1 = "string 1 goes here";
std::string str2 = "string 2 goes here";
str1 += str2; // add str2 to str1 |
Forum: C++ Mar 5th, 2005 |
| Replies: 2 Views: 4,389 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. |
Forum: C++ Mar 4th, 2005 |
| Replies: 1 Views: 2,894 search the code snippets. There are many examples there. strcmp is probably being passed / is returning invalid data. If you want strings why not use the string class?
also strcmp needs const char... |
Forum: C++ Mar 4th, 2005 |
| Replies: 3 Views: 3,751 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... |
Forum: C++ Mar 4th, 2005 |
| Replies: 5 Views: 3,597 You could investigate DirectX graphics. It really isnt hard as long as you error check all the way, otherwise it starts getting frustrating. Or even easier try OpenGL |
Forum: C++ Feb 7th, 2005 |
| Replies: 9 Views: 7,315 paolo have you tried EXPORTING / SAVING the sheet as a txt? And saying yes to something you say you dont know what it is (vb) in the next sentence is a bit worrying... ffrosk you cant complain really... |
Forum: C++ Feb 7th, 2005 |
| Replies: 2 Views: 7,460 DONT use 10h graphics. Im assuming you have
mov ax, 0x13 or whatever
int 10h
This WONT work in dev C++ as it is a 32 bit compiler. You need to use a 16 bit compiler such as DJGPP! Or get a... |
Forum: C++ Feb 7th, 2005 |
| Replies: 2 Views: 1,719 There are both these solutions in the code snippets library! |
Forum: C++ Feb 7th, 2005 |
| Replies: 9 Views: 7,315 that makes no sense! Do you mean translate The EXCEL VB functions? |
Forum: C++ Feb 7th, 2005 |
| Replies: 13 Views: 13,859 FireNet a good way to benchmark using the tutorial you just wrote would be to time a complete screen fill of pixels followed by some lines. Make it complex enough to differentiate between computer... |
Forum: C++ Feb 7th, 2005 |
| Replies: 13 Views: 13,859 UNLESS you are compiling in 16 bit you CANNOT initialise a pointer to base VGA. Base VGA also is NOT 0xA000 in VBE systems (for 32bit ) as it varies and you need to get a pointer to it using asm... |
Forum: C++ Feb 5th, 2005 |
| Replies: 9 Views: 7,315 The question implies you want the EXCEL functions to be written in a txt file --> which doesnt really make sense. It seems like you are after code to parse an EXCEL data file of some sort into... |
Forum: C++ Feb 5th, 2005 |
| Replies: 2 Views: 1,374 A basic idea would be
1) Blit the blurred picture
2) Define a rectangle around the mouse co-ords (clipped to the blurred pic too!)
3) Blit the clear portion in the rectangle
Win32 GDI should... |
Forum: C++ Feb 5th, 2005 |
| Replies: 5 Views: 4,293 A Win32 Text editor can be done with little effort indeed. Not much coding needed as long as you can get a window up and fill it with a menu + edit control (add a status bar as well if you like....)... |
Forum: C++ Feb 5th, 2005 |
| Replies: 1 Views: 2,001 Its pretty much been coded FOR YOU!
int a[] = {5, 8, 4, 1, 7}, b[] = {12, 3, 15, 6, 23, 1, 2}; // lists declared
int sizeA = sizeof(a)/sizeof(int), sizeB = sizeof(b)/sizeof(int); // list sizes... |
Forum: C++ Feb 4th, 2005 |
| Replies: 3 Views: 1,775 that happens a lot - you will need to design a method to eliminate the possability of entering a character! the isdigit() function from <cctype> should help. :) |
Forum: C++ Feb 3rd, 2005 |
| Replies: 4 Views: 5,212 that doesnt sound right! For 2 complex numbers
(a+bi) + (c+di) = z (z is the result)
real(z) = a+c
im(z) = b+d
So why do you want to add the real of one complex number to a different... |
Forum: C++ Jan 31st, 2005 |
| Replies: 1 Views: 5,867 as jwenting said you CANT increase the size of an array, you have to make a seperate bigger one and copy, or use a linked list / vector solution. No need to x2 post! :) |
Forum: C++ Jan 31st, 2005 |
| Replies: 18 Views: 33,307 Spotted a few errors (although i accept it is work in progress :) ): main should be declared as int main NOT void main....
...GraphMode is undefined as the previous ; finishes the statement (change... |
Forum: C++ Jan 27th, 2005 |
| Replies: 2 Views: 1,963 you might want to use Win32 Lib functions or even better -> assembly language. Embed it in C++ inline for an easy ride, or make a 16 bit asm program, it is an easy way to read ports. |
Forum: C++ Jan 27th, 2005 |
| Replies: 14 Views: 10,653 again: it is the function causing the error. invalid values are the MOST common cause for it to QUIT WITHOUT making a MS Windows error box. New versions have probably disguised the error and made the... |
Forum: C++ Jan 27th, 2005 |
| Replies: 16 Views: 14,245 whilst we are on the subject of structures.....
I have only experienced this TWICE in all my programming years....
struct var
{
unsigned int a, b, c, d, e, f, g;
unsigned char h,... |