MosaicFuneral 812 Nearly a Posting Virtuoso

If you don't even need all that fancy stuff anyway, DX9. Maybe even try SDL or Allegro if you'd like even more OS cross-platform compatibility.

MosaicFuneral 812 Nearly a Posting Virtuoso

If it's so simple you probably could have you used the search engine bar.

You'll probably find something similar to your question, here:
http://www.digitalpoint.com/tips/filemaker.html

MosaicFuneral 812 Nearly a Posting Virtuoso

Actionscript if your into flash games, C++ is my preferred language.

MosaicFuneral 812 Nearly a Posting Virtuoso

cout not understood? Are you including the right headers?

There's Code::Blocks, and Dev-C++

MosaicFuneral 812 Nearly a Posting Virtuoso

TAs chip designers, not C++ programmers, we would normally construct these routines at ASM/uC level and thus have complete control over both implicit/explicit code generation. However, due to product restructuring, we must now produce native C/C++ "programmer-friendly" firmware which is readily accessible by designer and non-designer alike. As most of our systems are tailored specifically for the embedded market, these routines MUST often maintain a customer-defined T-State/Memory metric in order to complete post-production testing.

You can use the inline assembler if you need a better low-level control:
http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html

MosaicFuneral 812 Nearly a Posting Virtuoso

I know that I could convert to binary, breed & mutate, and then convert back to decimal

The computer is always technically in bin... even if you're using dec values in a high-level language.

MosaicFuneral 812 Nearly a Posting Virtuoso

Do you have the code pasted twice?

If it's your code, then shouldn't you know how to to add data to your nodes?
And divide by eight groups? Like eight lines of input, or eight values in a single line?

MosaicFuneral 812 Nearly a Posting Virtuoso

Table fields in HTML, or what? And why are SHOUTING?!

MosaicFuneral 812 Nearly a Posting Virtuoso

Does it have to be Matrix * Matrix::op , and Matrix &Matrix::op ?

MosaicFuneral 812 Nearly a Posting Virtuoso

It wasn't rude.... there is a Game Dev forum here too.
Does your game engine have a GUI you can use, letting you progress to the rest of the code?

MosaicFuneral 812 Nearly a Posting Virtuoso

Worked for me. Post your compiler and options.

MosaicFuneral 812 Nearly a Posting Virtuoso

This?
http://curl.haxx.se/libcurl/c/libcurl-tutorial.html

The zip had some pretty good examples in \doc\examples\, such as the one named "simple.c"

MosaicFuneral 812 Nearly a Posting Virtuoso

Everything for using C-style strings is in string.h
Here's a reference:
http://www.cplusplus.com/reference/clibrary/cstring/

MosaicFuneral 812 Nearly a Posting Virtuoso

You could have just bumped your post. And alongarray was just a substitute for your vector... did you read the link about vectors I posted?:
http://www.cplusplus.com/reference/stl/vector/

MosaicFuneral 812 Nearly a Posting Virtuoso

Here's code from something I was doing the other-night:

string str = "I'm a fairy! abc xyz ABC XYZ";
int casechanged = 0;

cout << str;
    for(i = 0; i < str.length(); i++)
    {
          if(isUpper(str[i])) { str[i] = toLower(str[i]); casechanged = 1; }
          if(isLower(str[i]) && casechanged != 1) { str[i] = toUpper(str[i]);}
          
          casechanged = 0;
    }
    cout << str;
    
    for(i = 0; i < str.length(); i++)
    {
          if(isLower(str[i])) { str[i] = toUpper(str[i]); casechanged = 1; }
          if(isUpper(str[i]) && casechanged != 1) { str[i] = toLower(str[i]); }
          
          casechanged = 0;
    }
   cout << str;

The isLower/Upper(), and toUpper/toLower(), are my own functions I wrote, just replace them with the proper names of the ones you're using.

MosaicFuneral 812 Nearly a Posting Virtuoso

For cURL go here, and download version 7.19.2:

http://curl.haxx.se/download.html

Read the docs, and examples that come with it.

MosaicFuneral 812 Nearly a Posting Virtuoso

Optimizing Software in C++
http://www.agner.org/optimize/optimizing_cpp.pdf

Agner has a few other manuals, on his site too.

StuXYZ commented: great link, thanks +2
MosaicFuneral 812 Nearly a Posting Virtuoso

There was a problem here that might have the solution, for you:
http://www.daniweb.com/forums/thread156929.html

MosaicFuneral 812 Nearly a Posting Virtuoso

If you need even larger numbers you might want to look at SSE:
http://www.tuleriit.ee/progs/rexample.php

MosaicFuneral 812 Nearly a Posting Virtuoso

Just assign the long value the way you normally would.
temp is the the "char temp[100];" you had...
http://www.cplusplus.com/reference/stl/vector/
http://www.cplusplus.com/reference/iostream/istream/getline.html
http://www.cplusplus.com/reference/clibrary/cstdlib/atol.html

You also want to check if the file was actually opened too:

if(inFile.is_open())
{
/*file handling code*/
inFile.close();
}
else
{
/*error handling*/
}
MosaicFuneral 812 Nearly a Posting Virtuoso

If you're going to use windows.h's Beep() instead of the old non-ANSI _beep(), you might as well use Window's GetKeyState(), or GetKeyboardState().

MosaicFuneral 812 Nearly a Posting Virtuoso

stdlib's atol() not atoi().

int countlines;
while(!inFile.eof())
{
inFile.getline(temp, 100);
alongarray[countlines] = atol(temp);
countlines += 1;
}

Good enough.

MosaicFuneral 812 Nearly a Posting Virtuoso

http://fltk.org/index.php
Or the Irrlicht game engine has an easy GUI, but to some it's still more in the "to-do" sort-of phase.


P.S I USE DEV C++ TOO, YOU GO TO NEW PROJECT, AND SELECT WINDOWS APP AND ALL ThE CODE ON THAT SITE WILL WORK IN IT!

Can you please avoid the color red, or green in forums with white backgrounds. I can't see it that well. Plus "SHOUTING" with bold on, makes it a little worse.
Thank you, a personal request.

MosaicFuneral 812 Nearly a Posting Virtuoso

You have the option of string.append(), for the end of a string; and string.insert() to insert characters at a known position, in a string.

string setpath = "set setpath=%path%;";
setpath.append(user);
system(setpath.c_str());

Or read The World of DOS - Creating Batch Files, that might help.

MosaicFuneral 812 Nearly a Posting Virtuoso

QBasic is a "starter" language.(sometimes)

MosaicFuneral 812 Nearly a Posting Virtuoso

can you try this...

if(devisor==true)
{
cout << i << "is a devisor" << endl;
}

Yes, it's the same thing. Since if() checks if the statement is true.
When you say if(condition == false) you're asking, "if it is true that this condition is equivalent to false".

MosaicFuneral 812 Nearly a Posting Virtuoso

I was just fooling around with encryption, till I ran into this.

But the the problem seems to be:

char a = 'a';
a = _rotr(a, 16);

is doing the same as:

a >>= 16;

Clearing the half of the bits. Instead of preserving the values, and rotating it halfway.
Is there some other function, or algorithm out there I can try instead?

Perhaps I should have posted in the C forums, since I believe it is a C function(stdlib).

MosaicFuneral 812 Nearly a Posting Virtuoso

Maybe not, but it's at least mind-numbing if it has to do "everything", all in one little package, with-in a week.(I have a bet to win)

MosaicFuneral 812 Nearly a Posting Virtuoso

I'm on Dev-C++ 4.9.9.2 default options, WinXP SP3, P4 w/ HT.

When I c-shift a value, and then back I get back distorted values. Using the standard _rotr() and _rotl.

/*somewhere in main()*/
    str = "I'm a fairy! abc xyz ABC XYZ";
    printf("\n%s\n", str.c_str());
    for(i = 0; i < str.length(); i++)
    {
          str[i] = itoc(_rotr(ctoi(str[i]), 1));
    }
    printf("%s\n", str.c_str());
    
    for(i = 0; i < str.length(); i++)
    {
          str[i] = itoc(_rotl(ctoi(str[i]), 1));
    }
    printf("%s\n", str.c_str());
/*till the end of main()*/

/*for clarity the ctoi, and itoc functions*/
inline int ctoi(char c)
{
    int i = (int)c;
    return(i);
}

inline char itoc(int i)
{
     char c = (char)i;
     return(c);
}

Am I just doing something wrong(like in the casting), or should I try another method?
Another problem might just be it's getting late, and should call it a night. lol

MosaicFuneral 812 Nearly a Posting Virtuoso

If you're writing the parser, then anything is possible! Oh course.... not everyone is insane as me. Sitting here writing a script parser for a game.

MosaicFuneral 812 Nearly a Posting Virtuoso

So the project is something like a phone directory, or large database management project? Which if so, then look at something like MySQL.

MosaicFuneral 812 Nearly a Posting Virtuoso

Well yes, there is a way. Thinking back to all those old text based games.

I need a little more clarification, on what you're asking.

MosaicFuneral 812 Nearly a Posting Virtuoso
MosaicFuneral 812 Nearly a Posting Virtuoso

This thread is from '07.... why bump it?

I dont think in c++ you can make a playble game .It needs heavy softwares like flash,3d max..

It's one of the top languages for it. For small games Flash and such is fine, but for larger projects C++ is the way to go. All you need is a decent engine.

3ds Max is just modeling software....

MosaicFuneral 812 Nearly a Posting Virtuoso

Emerald214, you already have this posted in the Game Dev. forms.

Just try this first, then slowly add things back till you find the problem.

void display()
{
        glClear(GL_COLOR_BUFFER_BIT);
	glFlush();
}

int main()
{
  glutCreateWindow("glut Test");
  glutDisplayFunc(display);
  glutMainLoop();

  return(0);
}
MosaicFuneral 812 Nearly a Posting Virtuoso

Haha, its normally me who just says "welcome" or occasionally "Hi <name>, welcome to daniweb". Kind of bottish but hey, I do like 50 of these a day.

Welcome anyway!

Ah! lol I guess that would be a little redundant, to do then.

Thanks. :)

MosaicFuneral 812 Nearly a Posting Virtuoso

Hello, here to warp my head with the C++ forums, and maybe keep up-to-date on tech related stuff(little bit behind, but pretty much the same).

The only people that seem to use these intro threads are one-line posters who seem very bot-ish..... or am I imagining things? lol