• Advertisement

Deek880

Member
  • Content count

    48
  • Joined

  • Last visited

Community Reputation

126 Neutral

About Deek880

  • Rank
    Member
  1. The key is that you can't write any code, since this is going to execute on a third party website.   All you can count on is that the third party site will read the first part of the cookie up untill the first semi colon, and that that read will take place in a <script> tag. Something that you do within that string had got to effect the way the third party web page displaye its page
  2. I'm trying to call a standard javascript function document.write off of a string read from a cookie.   The web page sets a cookie like so: document.cookie="document.write('Charles'); expires=Thu, 18 Dec 2014 12:00:00 UTC; path=/";   It then retrieves the cookie like so: var x = document.cookie;   After this is done the string contained by x=:  "document.write('Charles')"   So there now is the document.write(str) function in the variable x, however the function does not write "Charles" to the web page.   How can I change this so that when the web page reads the cookie, it automatically outputs "Charles" to the body of the web page through the document.write funcion.   Any help or pointers to the answer would be most appreciated.
  3. initializing a vector c++

    Actually Spiro's method of initializing a reference to a vector didn't compile 10 errors. But I'm using visual c++6.0 which is a 1998 compiler, even though it was current up to 2004.   This works, its a mix of both suggestions:   game.h   std::vector<player *>playervec;   player * P   game.cpp   game::game() {      P = new Player;     gPlayerVec.push_back(P); }   Now, a change  works across all vectors and the underlying player whether initiated from the player or the vector.   Question, Is it worth re-writing the whole program which has grown up with a constant array of Players? I can accomplish the same thing with an I & J loop setting the requisite elements equal to each other at the end of every game run loop.
  4. initializing a vector c++

    I think Spiro answered the question. I haven't tried to implement his code yet, (but thank you for the help spiro) but I think he is exactly right   What I'm trying to do this: I have a fixed size array of players in player class, then I have a vector of player waiting to get into the game, gPlayerVec, then the game players are in gPlayerVecCopy that are active, This is a vector with players back inserted from gPlayerVec.   When a player sits out he is poped out of the vectors, but the player array keeps track of what would have been his opportunities. When the player comes back in he is pushed back into the vector.   The vectors aren't recognizing the changes that have been made to the player when he is put back in. Or lets say when I try to change a variable directly from the underlying player in the player array, the vectors of players aren't picking up on it.
  5. I have a game class in which I want to initialize a vector of players: Please note that this has to be a reference: It goes like this: #define GAME_H #include "player.h" #include <vector> #include <iostream> #include <iterator> class game { public: game(); ~game(); player P; std::vector<player>&gPlayerVec; std::vector<player>gPlayerVecCopy; void PlayGame(); }; #endif //GAME_H I get the following error when I compile: c:\mpgames2\pointer\game.cpp(9) : error C2758: 'gPlayerVec' : must be initialized in constructor base/member initializer list         c:\mpgames2\pointer\game.h(17) : see declaration of 'gPlayerVec' c:\mpgames2\pointer\game.cpp(9) : error C2758: 'gPlayerVecCopy' : must be initialized in constructor base/member initializer list         c:\mpgames2\pointer\game.h(18) : see declaration of 'gPlayerVecCopy'   the game constructor is here: game::game() { gPlayerVec.push_back(P); } What do I need to put in there to fix this problem
  6. I'm trying to complile a program that was written about 10 years ago. I've got windows xp and visual c++ 6.0. Ive updated both those programs as far as I can, Using directx 9.0 b with the extras package. Eveything is linked properly.   The file "usp10.h" does not exist on my computer. I've done searches for it and the compiler is right, the file simply isn't there. What add on file or program do I need to make this work?
  7. There is no "switch button" in my version of Visual Studio. However I figured it out, for anyone else that has this problem:   1. Anywhere you see MBCS (mulitbyte character set) project ->settings->C++ General, replace MBSC with UNICODE, and _UNICODE. UNICODE for the compile and _UNICODE for the run time library.   Hit the resources link and add the same to Pre-Processor definitions and Project Options.   Then hit the MIDL button and do the same.   Now it will compile without the unicode error.   However now that I've gotten past that I'm getting another error "usp10.h" no such file or directory. This is true I've done searches and the file doesn't exist on my computer. I've gotten the latest updates for windows XP and my compiler. What file or library am I still missing
  8. I'm running into a bit of a problem:   I'm using Microsoft Visual 6.0. It's basically a 1998 compiler with windows XP. I'm using directx 9.0b.   I've been through all DirectX SDK's up to 10.0.   I'm down to the following problem. #error "DXUT requires a Unicode build".   I've tried to put it in the pre processor directive and all that but it's not working.   What can I do other than buy a new computer and a new compiler. Does anyone know how to re write this file so that it is in ansi, or anything else?
  9. I have a project that is quite advanced.  It is basically a working bug free online multiplayer poker software app.   [CONTENT REMOVED BY MODERATOR] (Please recruit in the classifieds section rather than the forums)   If anybody is interested in working on this for a fee let's talk
  10. Can anybody recommend a remote cloud server or dedicated server for a win32  game application?. I need a static IP obviously, and expect that I will need to serve up data on about 100 different ports within a year.   I would prefer a server that has a physical location outside of the US for legal reasons. Currently have no active players so I don't need something really expensive.   In my local area the cable company wants a three year contract for a business internet service with a static IP and I may be moving in the next two months so the idea of a cloud or dedicated server looks like the way to bet started.    
  11. Thanks for the tip. I downloaded Inno and will fool around with it later on today.   I am still wondering, Back in 2007 i started delving into programming. I bought visual studio 2005 professional. At that time it was current. Now I see that they have 2008, 2010, 2013 and so on. That give you an idea how long I've been working on this, althrough I didn't really starty work on this project until about 2009.   I've seen some tutorials since my last post that show how to use visual studio 2005 and the windows installer to create a self installing .exe for your project. However, none of the project settings that they refer to show up on my compiler. in particular the say go to project->add to project->new->projects and then click on "other projects" from there you are supposed to get to the windows installer and all its settings.   My problem is there is no "other projects" button on visual studio 2005 professinal. All I get is:   ATL COM App Wizard Cluster resource type wizard Custom App Wizard Database Project Dev Studio Add in Wizard ISAPI Extension Wizard Makefile MFC Active X Control Wizard MFC App Wizard(dll) MFC App Wizard(exe) Utility Project Win32 Application Win 32 Console Application Win 32 Dynamic Link Library Win 32 Static Libary   I'm wondering if you have ever faced this problem of not having an "other projects" link in visual studio or how ti get to the windows installer from my available options.   Thanks!  
  12. My client side game application is just about ready to put out to the public.   I'm looking for information as to what I need to do so that when the client downloads it, it installs a desk top icon on his start up menu and acts like most commercial store bought applications do when you first go to start them up, such as intalling itself into the users program files and so on.   Any helpful starting points for this subject are most appreciated.
  13. The work is done.   I've created a complete online multiplayer, multigame texas hold' em application.   I could have used a little more help guys, especially hp.
  14. Hello:   I am trying to create a text outfile for a class object after compile time to record data.   I need a way to convert from char * to const char *;   the following does not work: void CPlayer::InitTxtFile(char * gamename) { char buffer[64]; sprintf(buffer,"%s.txt",gamename); ofstream myfile(buffer); } Lets say that gamename variable = Vegas. How do I make ofstream myfile(buffer) work the same as ofstream myfile("Vegas.txt");   Any suggestions are most appreciated.    
  15. Winsock difficulties

    HP: Your hostility is unbelievable. I came to this forum seeking knowledge, not abuse. [quote name='hplus0603' timestamp='1317015223' post='4865951'] [quote name='Deek880' timestamp='1316992154' post='4865896'] This is what I was driving at in the first place. Like I said (I can't believe this is the way it is done!) [/quote] Hearing you say that sounds a bit like someone who just learned to drive saying "Why do I have to stop at stop signs? I can't believe that this is the way it's done!" The reason you can't believe it, is because you don't understand the underlying technologies, and what TCP sockets are (as compared to, say, a high-level RPC library, or a low-level networking packet). I suggest you read a good networking textbook, such as TCP/IP Illustrated by Stevens (also mentioned in the FAQ, I think). If you don't want to buy it, it should be available for free at most libraries. [/quote]
  • Advertisement