Forum: C++ Jun 3rd, 2008 |
| Replies: 9 Views: 1,359 You were right I needed to used the ".c_str()". Thanks!! |
Forum: C++ Jun 3rd, 2008 |
| Replies: 4 Views: 647 Thanks mitrmkar, you gave the perfect solution, strcat(variable1, variable2.c_str()); works perfectly!! :) |
Forum: C++ Jun 3rd, 2008 |
| Replies: 4 Views: 647 Actually no, I get an error message saying:
"cannot convert from std::string to const char."
The parameters for strcat are: (char*, const char). |
Forum: C++ Jun 3rd, 2008 |
| Replies: 4 Views: 647 Normally if I want to concantinate two strings I would use:
strcat (variable_name, "Constant");
But is there a function that let's me use (variable1, variable2) ?
Any help is welcome. :) |
Forum: C++ Jun 2nd, 2008 |
| Replies: 2 Views: 463 That worked perfectly, thanks!! :) |
Forum: C++ Jun 2nd, 2008 |
| Replies: 2 Views: 463 Is there a way to convert from an integer to a string? |
Forum: C++ May 7th, 2008 |
| Replies: 6 Views: 663 Thanks for your asuggestion I investigated the seekg and seekp functions and found them to be very useful, b ut it turns out that I didn't need them after all. ;) |
Forum: C++ May 7th, 2008 |
| Replies: 12 Views: 6,468 Hate to admit it, but you're right. you can only use msk88's suggestion for Dev projects. :( |
Forum: C++ May 5th, 2008 |
| Replies: 6 Views: 709 Thanks, that worked perfectly!! :) |
Forum: C++ May 1st, 2008 |
| Replies: 6 Views: 663 What if I want to read:
a character.
a string.
In that order. |
Forum: C++ May 1st, 2008 |
| Replies: 6 Views: 663 I mean to overwrite, but how does seekg and seekp work? |
Forum: C++ May 1st, 2008 |
| Replies: 6 Views: 663 Is there a way to chose where a program outputs text to a file ?(or read text from a file). As in selecting which line to start from.? Any help is welcome. :) |
Forum: C++ May 1st, 2008 |
| Replies: 2 Views: 961 Hello to all, I need to know how to read the space bar as a character (or string) rather than as a separator, and I also need to know if the same can be done with the enter key. I am grateful for all... |
Forum: C++ Apr 27th, 2008 |
| Replies: 6 Views: 709 How do I convert text in upper case to lower case? :?: |
Forum: C++ Apr 27th, 2008 |
| Replies: 12 Views: 6,468 How do I change the icon of the exe. in console mode? (as part of the exe itself) :?: |
Forum: C++ Apr 27th, 2008 |
| Replies: 6 Views: 775 That worked perfectly, thanks!! :) |
Forum: C++ Apr 23rd, 2008 |
| Replies: 6 Views: 775 I did a bit of research and this is what I came up with:
#include <iostream>
#include <direct.h>
using namespace std;
int main(void) |
Forum: C++ Apr 21st, 2008 |
| Replies: 6 Views: 775 How do I read a file thats in a folder, but is in the same folder as the exe.? And how do I do this no matter what folder the root folder is placed in? |
Forum: C++ Apr 17th, 2008 |
| Replies: 7 Views: 923 Hey doug, thanks for the code, worked like a charm. Now I know how to use threads! Yeehaw!! |
Forum: C++ Apr 8th, 2008 |
| Replies: 9 Views: 1,794 Thanks, it worked like a charm. I should have mentioned that I need the code for enter as well, but I suppose it would be wise to ask for the codes as many keys as possible. Thanks!!
(^ _ ^) |
Forum: C++ Apr 6th, 2008 |
| Replies: 7 Views: 923 Hey doug, thanx for your suggestion, it complied and worked perfectly, but I don't really understand how the program works and I was wondering, how an example like this would work if an input from... |
Forum: C++ Apr 6th, 2008 |
| Replies: 9 Views: 1,794 Hey doug, thanks for your suggestion, I tried to create a program with the code you submitted, but the thing is, when I try to run the exe., the window opens, and then closes, just like that, so I... |
Forum: C++ Apr 5th, 2008 |
| Replies: 9 Views: 1,794 Hey wassup? I need to know how to detect arrow keysand the escape key, and any help would be greatly appreciated, thanks! |
Forum: C++ Apr 5th, 2008 |
| Replies: 7 Views: 923 Thanks tracey, but I need help with a few things. First of all, I don't understand the code (I'm new a C++) so could you explain it to me? Second, what s the code supoosed to do? Thirdly, if I wanted... |
Forum: C++ Mar 26th, 2008 |
| Replies: 7 Views: 923 Hi I need an example of how threads are coded and implemented in Dev-C++, any help would be greatly appreciated. :) |
Forum: C++ Feb 12th, 2008 |
| Replies: 12 Views: 2,713 Yes I thought about that, but I need to be able to have an enemy attacking the player without the console waiting for an input from the player.
Right now my code is:
//For the monster//
... |
Forum: C++ Feb 11th, 2008 |
| Replies: 12 Views: 2,713 Hey Narue, thanks for the advice on threads, it help a whole lot! |
Forum: C++ Feb 6th, 2008 |
| Replies: 1 Views: 2,082 I'm new to C++ and I'm working with the Dev-C++ complier and I'm wondering, Is there a way to change the consoe app font? I would also like to know if more than one font can be used simultaneously?... |
Forum: C++ Feb 6th, 2008 |
| Replies: 12 Views: 2,713 Sorry for the really late reply, but I looked at your suggestion and I was wondering, how would I check to see if an input is available? Please post code. One more thing, is there a way to avail an... |
Forum: C++ Jan 21st, 2008 |
| Replies: 9 Views: 1,359 Aww man!, I totally thought that would work, but now the compiler says:
--- cannot convert `std::string' to `const CHAR*' for argument `1' to `BOOL CopyFileA(const CHAR*, const CHAR*, int)' ---
... |
Forum: C++ Jan 18th, 2008 |
| Replies: 9 Views: 1,359 I figured thought that the "CopyFile" function could only take certain arguments. And I tried
your suggestion and I was proven right. The error message said:
-- invalid conversion from `const... |
Forum: C++ Jan 18th, 2008 |
| Replies: 9 Views: 1,359 I'm trying to make multiple copes of the same file, like: filename[1].ext, filename[2].ext, etc... and windows is my platform. The only commmand that I know of is the "CopyFile" command of windows.h... |
Forum: C++ Jan 18th, 2008 |
| Replies: 9 Views: 1,359 Hi I need to make multiple copies of a file using Dev-C++ can anyone help? |
Forum: C++ Jan 10th, 2008 |
| Replies: 12 Views: 2,713 So if I don't need to use multithreading how can I get around having to wait for an input from the user? Any help will be greatly appreciated. (^ - ^) |
Forum: C++ Jan 8th, 2008 |
| Replies: 12 Views: 2,713 What is SDL exactly? (If I come across like a Newbie I am I just started C++, and don't know very much.) |
Forum: C++ Jan 7th, 2008 |
| Replies: 12 Views: 2,713 I'm trying to make a shooting video game in conole mode but the game pauses to recieve an input from the key board. Ho can I get around this? How do game engines work? DFor exaple in a game like... |