General C++ Programming - May 2011 (Page 32)

by Zap
C++ equvalents of certain C# functions/methods
 
some time ago i created a game in C#. It's basically one of those where a car is moving side to side to avoid objects. there are a few parts that i don't know t...
[2 replies] Last: ok thanks, i figured as much. (by Zap)
need help with fscanf in c++
 
I new to this forum so i not sure where to put this. void FlightData :: ReadFlightData(){ FILE * FD; FD = fopen("FlightDetail.txt","r"); i...
[8 replies] Last: @ NickPaul C++ streams are type safe, flexible and extensible eg: you... (by Bazzy)
how to convert images through C++
 
Hi, i need to write a code which can convert a raw image to anyother desired format like BMP or JPEG etc.
[no replies]
2d blocking volume
 
Hi all I've got a blocking volume entity in a game I'm making and all I want it to do it stop the player/enemies from going through it, it doesnt need to kno...
[1 reply] : Blocking volume? Here's what I did: bool player::handle_collisions(... (by ultifinitus)
error using set_union of stl with sets
 
#include<iostream> #include<set> #include<stdlib.h> #include<algorithm> using namespace std; typedef set<short> pos; typedef struct tree { pos first,re...
[1 reply] : [co de] "Please use code tags" [/co de] http://www.cplusplus.com/f... (by ne555)
by declan
Problem with simple artificial neural network -- adding
 
Hi everyone! I am trying to make a simple artificial neural network work with the backpropagation algorithm. I have created an ANN and I believe I have implemen...
[no replies]
Resource Management and std::map::find Speed
 
I am writing resource management code for a game engine. My resource manager currently is a template class so that it only handles one particular type of resour...
[6 replies] Last: Thanks for your help. (by anonymous23323124)
Need urgent help, any help would be appreciated. thanks
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[4 replies] Last: No, I don't know where the problem is. And since neither you seem to k... (by m4ster r0shi)
GSL lib<matrix.h> C++ How to pass a matrix to a function?
 
as the tittle stated, I would like to ask how can you pass a gsl_vector* e = gsl_matrix* S = gsl_matrix_calloc; ( n, n) to a function?
[9 replies] Last: Could you please post somewhat complete code to see exactly what are y... (by savavampir)
by kris84
Reserving a word
 
Lets say I have a string "THIS IS GREAT !!" I need to reverse the phrase but only the ORDER of the words. The output would be "!! GREAT IS THIS". Can anybod...
[11 replies] Last: You make no use of what you pushed into vWords. savavampir posted the ... (by hamsterman)
FileOperations - Capitalize First Letter of Each Word in Sentence
 
Hi, I wrote this code first then was asked to modify it so that the program read the contents of the first file and change all the letters to lowercase except t...
[1 reply] : bool new_sentence = true; char ch; while(in.get(ch)){ if( ch is... (by hamsterman)
Use c.arse(p) to delete the middle number
 
Hi everyone I was asked ti define integer list, and ask the user to enter at least 5 numbers. Then, use the c.erase(p) to delete the middle number and display ...
[1 reply] : The first thing that pops into my mind is that the data type mylist is... (by closed account 3hM2Nwbp)
Standard Deviation Program
 
Good day! I have been trying to code a program with 2 functions: One which takes a vector of integers and calculates the average. The other is to calculate the ...
[2 replies] Last: I see. Thanks! And to your question, vector::size() cannot be zero or ... (by freshjunior)
Swap function
 
Need to swap these.... int *ip = &i, *jp = &j; Cant get it to work properly. My code: void ptswap(int* ip, int* jp) { //int *temp; int **tem...
[11 replies] Last: Yeah that didn't work either, no worries. This was for an assignment,... (by anakin827)
Sample problem
 
I was given the following sample problem: class Tower { private: int height; public: Tower(int i) { height = i;} bool operator<(Tower rhs) { return (height ...
[8 replies] Last: However bool Tower::operator<(Tower rhs) should be bool Tower::ope... (by ne555)
Password verification ASAP..
 
Hey, I am working on a project to verify a password with 6 minimum and a digit. Heres the code i have for now. #include <iostream> #include <cstring> ...
[2 replies] Last: i figured it out i was returning an integer within a boolean function ... (by diaz994)
by Faurax
Reading multi values from string
 
string name_age_IQ; name_age_IQ = Lucas:37:13; string name; int age; int iq; How do I import: "Lucas" to string name, "37" to int age, and "13" to int IQ?...
[2 replies] Last: Thanks! (by Faurax)
Unknown QuickSort Error
 
Hi everybody, I was writing a quicksort algorithm to better understand it, but for some reason it will output a non-sorted array. I have searched the internet ...
[10 replies] Last: I see that you dynamically retrieve the value of the pivot by using da... (by webJose)
---------------------------------------
 
will figure out by myself instead. thanks
[14 replies] Last: @nanochan1: could you give us another chance? (common, it was just 1 h... (by ne555)
May 2011 Pages: 1... 303132
  Archived months: [apr2011] [jun2011]

This is an archived page. To post a new message, go to the current page.