Jump to content

  • Log In with Google      Sign In   
  • Create Account


markrodgers11

Member Since 05 Oct 2012
Offline Last Active Jun 02 2013 09:45 PM
-----

Topics I've Started

Quake

28 May 2013 - 11:17 AM

I came across this picture online and was curious how all these games have been derived from Quake? Is there some sort of public license-free source code of quake that we can use to develop from? If so does anyone know if its even worth it and if so where you could acquire this source? Not to mention, if they are all available, which would be best to develop from? Quake 1,2,or 3 src?

Spoiler

directx10 sdk download?

20 December 2012 - 05:03 PM

I'm having issues finding directx 10 sdk..

this is the link i found but im not sure whether it is dx10 or dx11.. I'm looking for 10.

EDIT: Maybe this is dx10?

http://www.microsoft.com/en-us/download/details.aspx?id=8109

Struct vs Classes?

22 October 2012 - 12:32 PM

What is the difference between structs and classes in C++?

accessing data from other .cpp files

19 October 2012 - 10:14 AM

I am working on a text-based RPG and I defined a vector in my game.cpp file and now I am trying to access it from my inputSystem.cpp file, it shows that it is unknown? I am wondering how I can access this vector from this other .cpp files?

-Thanks

vector compile error?

17 October 2012 - 11:17 AM

I'm trying to build my 2nd text based RPG but this time I wanna make it more flexible and have the code split up and everything. I will post my source code below and my compile error:

Source Code:

init.cpp
#include <iostream>
#include "game.h"
#include "rooms.h"
void main() {
intro();
}

game.cpp
#include <iostream>
#include <string>
#include <vector>
#include "rooms.h"
using namespace std;
void intro() {
pRooms[9] = 10;
checkRoom();
system("pause");
}

game.h
#include <string>
#include <vector>
using namespace std;
// Prototypes //
void intro();

rooms.cpp
#include <iostream>
#include <vector>
#include "rooms.h"
using namespace std;
int checkRoom() {
int cRoom = 0;
int counter = 0;
int x = 0;
if (counter <= nRooms) {
  if (pRooms[x] = 1) {
   x = cRoom;
   cout << "cRoom = " << cRoom;
  }
  else {
   ++counter;
   ++x;
   cout << "Adding 1\nAdding 1 to x";
  }
}
return cRoom;
}

rooms.h
#include <iostream>
#include <vector>
using namespace std;
// Prototypes //
int checkRoom();
// Vectors //
vector<int> pRooms(10,0);
// Integers //
int nRooms = pRooms.size();

Build Log

1>------ Build started: Project: textRPG, Configuration: Debug Win32 ------
1>  game.cpp
1>  Generating Code...
1>  Skipping... (no relevant changes detected)
1>  rooms.cpp
1>  init.cpp
1>init.obj : error LNK2005: "class std::vector<int,class std::allocator<int> > pRooms" (?pRooms@@3V?$vector@HV?$allocator@H@std@@@std@@A) already defined in game.obj
1>init.obj : error LNK2005: "int nRooms" (?nRooms@@3HA) already defined in game.obj
1>rooms.obj : error LNK2005: "class std::vector<int,class std::allocator<int> > pRooms" (?pRooms@@3V?$vector@HV?$allocator@H@std@@@std@@A) already defined in game.obj
1>rooms.obj : error LNK2005: "int nRooms" (?nRooms@@3HA) already defined in game.obj
1>H:\C++	extRPG\Debug	extRPG.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

PARTNERS