Forum: C++ 1 Day Ago |
| Replies: 11 Views: 237 Hey man thanks for your posts, they have helped me alot to reach the next stage of my project. Just if you're wondering, I am making a Text-based SUD(Single User Dungeon). Thanks again mate. |
Forum: C++ 2 Days Ago |
| Replies: 11 Views: 237 Making it static didn't work, I'll attach the project in a .zip. |
Forum: C++ 2 Days Ago |
| Replies: 11 Views: 237 Bump, This is kinda urgent by the way. |
Forum: C++ 2 Days Ago |
| Replies: 11 Views: 237 That was just an error by me when copying and pasting it.
This is what it looks now:
std::vector<BaseEnt> entities(MAX_ENTITIES);
MAX_ENTITIES is a macro with the value of 100000.
Any help... |
Forum: C++ 3 Days Ago |
| Replies: 11 Views: 237 |
Forum: C++ 3 Days Ago |
| Replies: 11 Views: 237 When I try to compile my code, I get this error:
------ Build started: Project: SUD, Configuration: Debug Win32 ------
Compiling...
baseent.cpp
c:\program files\microsoft visual studio... |
Forum: C++ 6 Days Ago |
| Replies: 2 Views: 169 When I try to compile this:
void *BaseEnt::GetVar(char const *varname)
{
char name = *varname;
switch(name)
{
case "id":
return (void*)id; |
Forum: Python 9 Days Ago |
| Replies: 1 Views: 109 I tried to make a leet speak converter, but it outputs characters that I don't even tell it to..
This is what I mean:
(Test run)
Enter something to convert to L337 5P34K: Hi, how are you?... |
Forum: C++ 13 Days Ago |
| Replies: 3 Views: 143 What?
This is what I wanna do:
void print_something(const char *val, ...)
{
//the val part can have things like this in it:
//%1, %2 and so forth, and then those parts get... |
Forum: C++ 13 Days Ago |
| Replies: 3 Views: 143 How do I access the paramaters entered after param1?
Like this:
void foo(param1, ...);
How do I access the ... part? |
Forum: C++ 13 Days Ago |
| Replies: 3 Views: 282 I did that, and now it compiles, but now when I run it I get this:
Unhandled exception at 0x00419537 in TheAlienEngine.exe: 0xC00000FD: Stack overflow.
And it points to this:
... |
Forum: C++ 13 Days Ago |
| Replies: 3 Views: 282 When I try to compile this:
#define NODES_MAX 100000
extern node_t _nodes[NODES_MAX];
It gives me this error:
------ Build started: Project: TheAlienEngine, Configuration: Debug Win32... |
Forum: C++ 14 Days Ago |
| Replies: 1 Views: 166 I am trying to make a 3D Engine using OpenGL, I've got all the model loading, 3D nodes, all that stuff done, but I get linker errors when I try to compile, it.. these are the errors:
------ Build... |
Forum: C 14 Days Ago |
| Replies: 6 Views: 181 In C, the '\n' character is a special type of character called a control character, these are characters that do something other then just display themselves, here is all the ones that I know:
\n... |
Forum: C++ 18 Days Ago |
| Replies: 2 Views: 166 Alternatively, you could visit this:
http://www.cplusplus.com/doc/tutorial/
And look at the things in there like loops, arrays, variables and stuff that you are curious about :) |
Forum: Python 18 Days Ago |
| Replies: 1 Views: 170 I am wanting to create a program that everytime I run it, it gets the current playing tune in iTunes, and sets this as my Facebook status:
"I'm listening to current_playing_song, corrent_artist."... |
Forum: C++ 18 Days Ago |
| Replies: 2 Views: 166 int x[5] = {1,2,3,4,5}, y[5] = {5,4,3,2,1}, ... int x[5] = {1,2,3,4,5}, y[5] = {5,4,3,2,1},
result[5] = {0,0,0,0,0};
This creates 3 arrays of the type int, with the names x, y and result.
int i = 0;
while(i++ < 5)
result[i] = x[i]... |
Forum: C++ 21 Days Ago |
| Replies: 5 Views: 278 What i mean is to have to dst thing a char* array.
I want it to do this:
string str = "10-20-30";
char* buffer[3];
split_string(str, buffer, '-');
//buffer should now be {"10","20","30"} |
Forum: C++ 21 Days Ago |
| Replies: 5 Views: 278 Is there any functions that split a string?
Such as this:
string s1 = "lol-lol2-lol3";
string s2[3];
char spliter_char = '-';
split_strings(s1, s2, spliter_char); |
Forum: C++ 29 Days Ago |
| Replies: 3 Views: 246 |
Forum: C++ 29 Days Ago |
| Replies: 1 Views: 181 How would I be able to iterate through each character in a file? The file is of type ifstream. |
Forum: Assembly 29 Days Ago |
| Replies: 2 Views: 294 How do you paint pixels in NASM, could someone tell me about it and mabey give me an example? |
Forum: C++ 29 Days Ago |
| Replies: 3 Views: 246 I want to be able to extract the file info of music files(title, artist, album, genere, ect.) and then rename the file to the title of the music track. But I don't know anything about this and have... |
Forum: Assembly 31 Days Ago |
| Replies: 5 Views: 333 I think it's because it's not converting the characters from their ascii codes to their actual value, is this right? |
Forum: Assembly 31 Days Ago |
| Replies: 5 Views: 333 |
Forum: Assembly 31 Days Ago |
| Replies: 5 Views: 333 What that did is after I inputed "tom" into it, it waited for me to input another peice of text and then still said that I had entered 7, this is what it looks like:
Please enter something: tom... |
Forum: Assembly 32 Days Ago |
| Replies: 5 Views: 333 |
Forum: Assembly 32 Days Ago |
| Replies: 5 Views: 333 I am trying to make a program that prompts the user for input then outputs it to them(back to the good old days :D). It all works, except it doesn't output what the user inputs, it outputs a bunch of... |
Forum: C++ Oct 3rd, 2009 |
| Replies: 7 Views: 359 |
Forum: C++ Oct 3rd, 2009 |
| Replies: 7 Views: 359 I am in no way trying to send this to someone to harm their computer, I am just curious about what the outcome would be. :) |
Forum: C++ Oct 3rd, 2009 |
| Replies: 3 Views: 217 Or you could do this(untested):
Instead of this:
printf("%c", ((theBoard[j][i]).grid));
Use this:
printf("%c", theBoard[j][i].grid); |
Forum: C++ Oct 3rd, 2009 |
| Replies: 3 Views: 217 I'm assuming that theBoard is of type Board.
It gives you this error because you don't have the [ and ] operators defined for the Board type. |
Forum: C++ Oct 3rd, 2009 |
| Replies: 7 Views: 359 Would this do any damage if I left it running for a while:
int main(){ while(1) new char[0]; } |
Forum: C++ Sep 30th, 2009 |
| Replies: 4 Views: 199 Hey thanks, that example is really interesting, I played around it and let the user input stuff(cin>>type) so it's interactive.
What about the second question? Mabey it would just call the base... |
Forum: C++ Sep 30th, 2009 |
| Replies: 4 Views: 199 What do you mean by checking from a list of options?
If you mean like this:
class Foo{
};
int main()
{ |
Forum: C++ Sep 30th, 2009 |
| Replies: 4 Views: 199 In the Quake 4 console, there is a "spawn" command, then you put the class name of what you want to spawn, eg. "spawn weapon_railgun".
>Meaning that it tried to construct the weapon_railgun class... |
Forum: C++ Sep 21st, 2009 |
| Replies: 9 Views: 237 struct{
int health;
int armor;
char* wep_name;
char* name;
} test_player = {
100,
10,
"master sword",
"tom" |
Forum: C++ Sep 20th, 2009 |
| Replies: 9 Views: 237 when i use the . i get these errors:
main.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\irrlicht game engine\irrlicht game engine\main.cpp(53) : error C2143: syntax... |
Forum: C++ Sep 20th, 2009 |
| Replies: 9 Views: 237 struct{
int health;
int armor;
char* wep_name;
char* name;
} test_player = {
100,
10,
"master sword",
"tom" |
Forum: C Sep 17th, 2009 |
| Replies: 17 Views: 538 Try changing this:
printf("%c",& array[i]);
to
printf("%d",& array[i]); |