49,757 Topics

Member Avatar for
Member Avatar for MasterHacker110

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 …

Member Avatar for mihbd1207
0
480
Member Avatar for triumphost

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 …

0
91
Member Avatar for triumphost

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: …

Member Avatar for triumphost
0
521
Member Avatar for aabbccbryanmark

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?..

Member Avatar for WaltP
0
299
Member Avatar for brad.ward.33

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' …

Member Avatar for brad.ward.33
0
369
Member Avatar for Labdabeta

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;// …

Member Avatar for Labdabeta
0
662
Member Avatar for triumphost

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 …

Member Avatar for triumphost
0
309
Member Avatar for Pyler

#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

Member Avatar for NathanOliver
0
82
Member Avatar for letterG

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{ …

Member Avatar for letterG
0
156
Member Avatar for newbie1234
Member Avatar for L7Sqr
0
335
Member Avatar for phorce

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: …

0
125
Member Avatar for coolikedat99

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 …

Member Avatar for coolikedat99
0
164
Member Avatar for triumphost

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 …

Member Avatar for mike_2000_17
0
157
Member Avatar for JamesWorth

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 …

Member Avatar for DeeperShade
0
225
Member Avatar for idislikemacs

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 …

Member Avatar for Ancient Dragon
0
307
Member Avatar for dancks

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 …

0
142
Member Avatar for az_ez

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 …

0
76
Member Avatar for kelechi96

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 …

0
105
Member Avatar for phorce

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 …

Member Avatar for Banfa
0
296
Member Avatar for sachintha81

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 …

Member Avatar for sriv
0
2K
Member Avatar for RonKevin

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 …

Member Avatar for RonKevin
0
564
Member Avatar for khallebal

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 …

Member Avatar for rubberman
0
174
Member Avatar for mochiboo5

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 …

Member Avatar for Karkalash
0
272
Member Avatar for mochiboo5

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 …

Member Avatar for DavidB
0
3K
Member Avatar for macla

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

Member Avatar for WaltP
0
446
Member Avatar for DeeperShade

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 …

0
85
Member Avatar for while(!success)

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() …

Member Avatar for while(!success)
0
4K
Member Avatar for <HHH>

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 …

Member Avatar for m4ster_r0shi
0
129
Member Avatar for Alochai

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 …

Member Avatar for Alochai
0
158
Member Avatar for bobyx

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 …

Member Avatar for iamthwee
0
151

The End.