49,757 Topics
| |
By C++ game engines i mean the language that the game is programed in is C++. I know irrlicht but it aint good for very big games becuase you have to code where everything is. At the moment i am using Unity but the language looks like C#. So what … | |
I just started shared memory and I took a big dive into it and got stuck trying to figure out how to share pointers. Well not really pointers: void* pData = MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, MapSize); Ok so the above holds my view of the file to be shared between … | |
Hey all. I'm having a problem with a DLL being loaded. In codeblocks, if I don't export Main + ALL the functions in my DLL, they cannot be used by an external program! Yet in visual studio, I exported nothing and external programs are able to load the DLL. Example: … | |
print "enter a number: "; $in = <>; chomp $in; print &prime($in); print "\n"; sub prime{ for($i=2;$i<($_[0]/2+1);$i++){ if($_[0]%$i ==0){return "not prime\n"} } return "prime\n"; } is this code for c++ language?.. | |
In this assignment, I am having to insert user information to tables that we have created and I am having this error that keeps on telling me " Code No: 80040e14 Code Message: IDispatch error #3092 Error Source: Microsoft OLE DB Provider for SQL Server Error Description: The name 'Br' … | |
I have two bounding boxes defined by the following values: m1.min.x;//the min x value of model 1 m1.min.y;// " " y " " " " m1.min.z;// " " z " " " " m1.max.x;// " max x " " " " m1.max.y;// " " y " " " " m1.max.z;// … | |
How can I iterate a buffer with a stride? For example, I saved the pointer to a vertex buffer for later use. I've got the stride, the pointer, and triangle count for vertices. I want to iterate my pointer using this info to get the vertices. I'm doing it wrong … | |
#include <iostream> #include <string> using namespace std; double distance(double x[],double y[]){ return sqrt((y[0]-x[0])*(y[0]-x[0])+(y[1]-x[1])*(y[1]-x[1])); } int main(){ double d; double x[]={1,2}; double y[]={4,3}; cout<<distance(x[2],y[2])<<endl; //cout<<d<<endl; cin.get(); return 0;} why wont it work I also tried d=distance(x[],y[]); cout<<d<<endl; but it wont work either | |
Hi again, I ran to some problems in input some codes but i'm quite sure that my code is correct but the output is not what I expect it to be, this is my code: #include<iostream> #include<string> #include<sstream> using namespace std; struct movie{ string title; int year; }; struct info{ … | |
any book or guide for c++ socket programming? Thanks in advance | |
Hello, I'm trying to write the Cooley Turkey algorithm for an FFT. Now, The algorithm works well, but, only for 2 numbers - Nothing else. For example, I have used an online FFT calculated, entered the same data and got the same results. Here is the code for the algorithm: … | |
I was trying to create a program that would require the correct password to be put in in order for it to display something. I was able to make a program that would require the right password to display a certain thing. But the problem is that it can only … | |
What are the last 4 values for? (m[0], m[4], m[8], m[12]) (m[1], m[5], m[9], m[13]) (m[2], m[6], m[10], m[14]) (m[3], m[7], m[11], m[15]) I've looked everywhere and cannot figure out what m[3], m[7], m[11], m[16] are for (ModelView Matrix).. It says to ignore them but I can't just ignore them … | |
Hi! I'm new in this forum. I was reading some other posts about Directx and so. Now I have a problem with Lightning in Directx. I wanted to do some graphics like minecraft's ones, with cubes. And when I got my cube class ready, i drawed one cube and that … | |
I'm done with my tic-tac-toe program, but now I want to ask a simple question to the winner of the match to make the victory absolute. Would I need a while loop? I also feel my code is too messy, how can I enhance/improve it? Thank you! #include <iostream> using … | |
I originally asked this question at cplusplus.com but got no responses. In my program I have the main player and enemy tanks. When using the shotgun weapon it works fine for the main player but it kills the bad guy when they use the weapon. I don't understand how this … | |
Hi, I have to make a GUI to input data into an SQL server 2008 r2 database, and I was hoping someone could give me a heads up about the how to do it? I remember the basics of doing it in Access but of course its different with each … | |
Basically I have created a sprite sheet/tileset with dimentions of 320 x 2048, the tiles are each 32 x 32. I've been able to load individual files with textures in them but I don't seem to be able to load textures from a sprite sheet. Any help ? Here is … | |
Hello, I'm wondering if anyone knows if there is a specific way or a library that allows me to read in an audio file in which I can then manipulate and get the different frequencies? I'm basically trying to make an application that uses an FFT for the audio signals … | |
In my C++ Win32 program I want to set the current Display Settings to "Extend" mode. I Googled and found out that SetDisplayConfig() is the way to go forward in Windows 7 (I'm on Windows 7) but now I am kind of stuck how to proceed as the MSDN explanation … | |
okay so im kind of confused now. . . . . i didn't even have a code to show you cause I know its wrong..I've been absent 2 days on my Programming so its really hard to cope up...i tried researching for ifstream.h and ofstream.h....and so far ifstream.h is for … | |
hi all all the deps were met,and autotools & ./configure run smooth,but make fails with the following error,tried with gcc2 & gcc4 environement,the same error, i hope to find some help here. here it is: In file included from xine.c:33:0: /boot/develop/headers/bsd/string.h:16:7: error: expected declaration specifiers or '...' before '(' token … | |
hello everyone, I am having a major problem with this assignment that asks to create a function whose input is a reference to an input file, which asks user to enter a file name to open for input, then checks to see where the file opened successfully. the function returns … | |
Hi everyone, this is my first post and I am new to C++. I am trying to figure out how to do this project. Newton’s method is an algorithm that can be used to solve an equation of the form f(x) = 0 using a sequence of approximations. Here’s how … | |
Hi, I have 2 GB file with 10 million lines. Is anyway to sort the file content without loading the full file content into memory | |
Yes, me again, here to prove i'm an idiot. :) Ok, all previous problems solved (wrapping win32, and getting winsock to actually do ANYTHING) My problem now is that recv is very random. Sometimes it'll recieve data, sometimes it'll return -1. WSAGetLastError (still not entirely certain I should be using … | |
Hey guys, I was wondering if anybody knew of a method to check if an element in a object array was empty. for example, lets say I have the class "XYZ" class XYZ { int x; string y; }; then in main if i declared the object array: int main() … | |
i want to read each line of my file in seprated string what i have achieved till now is i can read the whole lines in one string and now i want to read each line in a sprated string any help; #include <cstdlib> #include <iostream> #include <fstream> using namespace … | |
So, i've been redesigning the program I've been making to make reusable functions, rather than copy/pasting almost identical code to several different functions (which is what I would have ended up doing). These upcoming sections of code are functions designed to, on a button press, navigate to a URL, scrape … | |
Hello,everbody. In many cases we should fill some fields on the different forms and in the different places of those forms which are the same like as; names,address,numbers,etc. I want to write a program with C++ or other languages that resident in a PC so that it can be simply … |
The End.