Forum: C++ 11 Days Ago |
| Replies: 12 Views: 266 Re: New to SDL Well, by doing the following ...
...
background = load_image("background.bmp");
if(background == NULL)
{
// load_image() failed ...
cout << "load_image() failed, error: " << SDL_GetError()... |
Forum: C++ 11 Days Ago |
| Replies: 12 Views: 266 Re: New to SDL Assuming that SDL is unable to load the image, you might place a call to SDL_GetError() (http://sdl.beuc.net/sdl.wiki/SDL_GetError) immediately after the line:
background =... |
Forum: C++ 18 Days Ago |
| Replies: 2 Views: 183 |
Forum: C++ 19 Days Ago |
| Replies: 2 Views: 183 |
Forum: C++ 22 Days Ago |
| Replies: 9 Views: 263 Re: Convolution helP Microsoft has documented the compiler/linker errors/warnings, so you can try looking them up in the MSDN or in the IDE's help, if you have it installed.
See Compiler Error C2601... |
Forum: C++ 22 Days Ago |
| Replies: 5 Views: 151 Re: DLL Function Call About code tags ... you don't have to type in the line numbers in the code you post, just specify cplusplus as the syntax i.e.
// code pasted here ... |
Forum: C++ 22 Days Ago |
| Replies: 2 Views: 124 Re: Definition problem Try with these changes
//CUSTOMERDLL.H
#ifndef DllH
#define DllH
#include "customerForm.h"
extern TCustomerF*... |
Forum: C++ 26 Days Ago |
| Replies: 7 Views: 315 Re: Changed event in fileSystemWatcher I guess that your editor makes calls to Windows API functions that cause the event to occur twice. You might write a simple test program which does a fopen()/fwrite()/fclose() sequence, the event... |
Forum: C++ 28 Days Ago |
| Replies: 3 Views: 151 Re: MySql++ Link Errors I think you are using a 32-bit toolset (VS Express) and trying to link with the 64-bit version of libmysql.lib.
The 32-bit version of libmysql.lib comes with those missing symbols, what you have is... |
Forum: C++ 31 Days Ago |
| Replies: 15 Views: 384 |
Forum: C++ 31 Days Ago |
| Replies: 13 Views: 283 Re: Struct: Having trouble reading into my file You most definitely want to take the inData.open("Unknown.txt"); and inData.close(); out of the for() loop. Open the file before you enter the loop and close the file after the loop has finished. |
Forum: C++ 33 Days Ago |
| Replies: 6 Views: 180 |
Forum: C++ Oct 10th, 2008 |
| Replies: 3 Views: 214 |
Forum: C++ Oct 8th, 2008 |
| Replies: 3 Views: 295 |
Forum: C++ Oct 1st, 2008 |
| Replies: 11 Views: 426 Re: file handling problem Which compiler/OS are you using?
The (modified) code worked for me (Visual Studio 2005), but NOT with GCC 3.4.2. |
Forum: C++ Oct 1st, 2008 |
| Replies: 33 Views: 885 |
Forum: C++ Oct 1st, 2008 |
| Replies: 11 Views: 426 Re: file handling problem A couple of things
1) When opening the file, in addition to the ios::out|ios::in flags, specify one of: app, ate or trunc (http://www.cplusplus.com/reference/iostream/fstream/open.html) flag.
2)... |
Forum: C++ Oct 1st, 2008 |
| Replies: 11 Views: 426 Re: file handling problem One fix to the reading problem is to re-open the file, or alternatively you might implement
something similar to seekg() (http://www.cplusplus.com/reference/iostream/istream/seekg.html) to set... |
Forum: C++ Sep 30th, 2008 |
| Replies: 19 Views: 732 Re: Vector Dimensions I think you are after ...
typedef List<String^> Vec1;
typedef List<Vec1^> Vec2;
Vec2 List1;
for( int j = 0; j < 1000; j++ )
{
List1.Add(gcnew Vec1()); |
Forum: C++ Sep 30th, 2008 |
| Replies: 7 Views: 252 Re: strange windows error You should initialize ElementAmount to zero. Note that if you compile with the -pedantic option, you'll get an error about variable-size array usage, i.e. you might want to change ...
char... |
Forum: C++ Sep 29th, 2008 |
| Replies: 9 Views: 267 Re: getline() issue Change s.erase(pos, pos); to s.erase(pos, 1);. The second parameter tells how many characters to remove at index pos.
[EDIT]
Seems I was late ... |
Forum: C++ Sep 27th, 2008 |
| Replies: 7 Views: 275 Re: priority of Function You might try something like ...
#include <iostream>
using namespace std;
struct test
{
void myfunction()
{
cout << "myfunction()\n";
} |
Forum: C++ Sep 27th, 2008 |
| Replies: 26 Views: 977 |
Forum: C Sep 26th, 2008 |
| Replies: 8 Views: 360 |
Forum: C++ Sep 26th, 2008 |
| Replies: 9 Views: 316 |
Forum: C++ Sep 25th, 2008 |
| Replies: 3 Views: 220 |
Forum: C++ Sep 21st, 2008 |
| Replies: 2 Views: 156 Re: emergency!!help me... It means that the i exists only within the for() loop.
You might change it to ...
int i;
for (i=0; i<20; i++)
{
r [i]=0;
}
// ... |
Forum: C++ Sep 20th, 2008 |
| Replies: 18 Views: 399 |
Forum: C++ Sep 18th, 2008 |
| Replies: 5 Views: 278 |
Forum: C++ Sep 14th, 2008 |
| Replies: 3 Views: 239 |
Forum: C++ Sep 13th, 2008 |
| Replies: 3 Views: 174 Re: trouble with bools...I think You are not converting from a char to int in the valid() function when comparing with 'a'.
Then a couple of notes:
- try choosing meaningful names, e.g. the valid() function takes three arguments... |
Forum: C++ Sep 11th, 2008 |
| Replies: 22 Views: 1,260 Re: Passing a member function pointer That error occurs also if you have implemented the mouse() function in a header file (.h) and include that header file in two or more source files (.cpp). So, you should move the implementation of... |
Forum: Windows tips 'n' tweaks Sep 11th, 2008 |
| Replies: 6 Views: 646 Re: Cant Delete a File You might download SysInternal's Process Explorer (http://technet.microsoft.com/fi-fi/sysinternals/bb896653(en-us).aspx) and use its Find handle or DLL utility to see which process has that .nrg file... |
Forum: C++ Sep 10th, 2008 |
| Replies: 7 Views: 437 Re: MySQL++ Could it be a 32/64-bit mismatch, for example libmysql.lib actually being the 64-bit version? |
Forum: C++ Sep 10th, 2008 |
| Replies: 7 Views: 437 Re: MySQL++ Sounds strange, I dumped the libmysql.lib exports
dumpbin /exports libmysql.lib =>
...
_my_realloc
_my_strdup
_myodbc_remove_escape@8
_mysql_affected_rows@4
_mysql_autocommit@8
_mysql_change_user@16 |
Forum: C++ Sep 7th, 2008 |
| Replies: 2 Views: 288 Re: VC++ Runtime Error Don't use window styles there, instead specify a combination of class styles, see http://msdn.microsoft.com/en-us/library/ms633574(VS.85).aspx#class_styles |
Forum: C++ Sep 4th, 2008 |
| Replies: 5 Views: 296 Re: Compile-time printing? There is also a manipulator by the same name, flush (http://www.cplusplus.com/reference/iostream/manipulators/flush.html) |
Forum: C++ Sep 4th, 2008 |
| Replies: 13 Views: 479 Re: Line count not working.... Hmm, just a thought .. how about changing one line of the signature to:
cout << "Hi there!" << "I'm a non-standard-compliant C++ coder!";
;) |
Forum: C++ Sep 3rd, 2008 |
| Replies: 5 Views: 173 |
Forum: C++ Sep 3rd, 2008 |
| Replies: 16 Views: 361 Re: Urgent Help in Binary Search Trees.. Well, first of all, be consistent with the names of the member functions, for example
int BST::SEARCHtree(node* i, int k)
{
if(i==NULL)
{
return 0;
}
else if(k == i->key) |