General C++ Programming - April 2013 (Page 39)

Enum problems
 
Some weird things have been happening when using enums for me. I'm trying to make a 2d RPG using opengl and C++. It was going well up to now. Basically my enum ...
[16 replies] Last: Sorry doesn't work either, I'm using codeblocks and the debuggers play... (by matthew9090)
Finite Automata ( transition diagram for unsigned numbers
 
Hi im trying to do a program with C++ . i want to make a transition diagram for unsigned numbers . anyone can help me ?
[no replies]
Shuffling Array Help!
 
I am having a lot of trouble regarding trying to shuffle arrays. I have a data file that the user interactively chooses. The file contains to sets of data. The ...
[3 replies] Last: Actually you would not need to use the shuffle tool if you use a loop ... (by poisson22)
std::string to const char*
 
I have this portion of a code and I'm receiving this error error C2664: 'strcmp' : cannot convert parameter 1 from 'std::string' to 'const char *' So how w...
[9 replies] Last: why not a map with a look up function? (by closed account Dy7SLyTq)
C++ using repetition structure (1,2)
 
I am trying to successfully complete this problem for my c++ class. Any help or comments would be greatly appreciated! In this exercise, you create a progra...
[30 replies] Last: I don't think you understand what we have given you. Spend some time w... (by Zaita)
I need advice for this 2D array program?
 
I wrote the following code as 1D array now I have to convert everything and make it a 2D array: #include <iostream> #include <ctime> using namespace std; ...
[4 replies] Last: but a const int would only replace one? const ints are much better bec... (by closed account Dy7SLyTq)
Installing SFML 2.0 with CodeBlocks on Mac OS X?
 
Hi. I have been coding SFML on my Windows bootcamp OS for quite some time now, but I would like to code it on my Mac OS. I have looked for about a week for a tu...
[2 replies] Last: nope! No XCode (by CppCoder101)
fin undeclared identifier, but is declared
 
Program is not finished as I can't get passed read_data Error: "error C2065: 'fin' : undeclared identifier error C2228: left of '.open' must have cl...
[2 replies] Last: are you actually going to use those functions or just declare them c s... (by closed account Dy7SLyTq)
by Maissa
simple explanation if you may
 
so basically have this project that needs to get done i just couldn't understand the last part of one of the questions ! so after me making 4 classes 3 of th...
[3 replies] Last: No problem, glad I could help :) (by Major Tom)
'_TCHAR' has not been declared
 
#include<iostream> #include<fstream> #include<string> int _tmain(int argc, _TCHAR* argv ) { std::fstream file; std::string temp; double first,s...
[1 reply] : To my knowledge, _tmain() and _TCHAR are non-standard Microsoft ex... (by Catfish3)
2-D Arrays Code Help
 
For the 2-array program I have to do the following: Create an init_board function that initializes your ocean (board) to all ‘O’ characters (you will nee...
[1 reply] : Interesting. You two must be in the same class. See this thread I am h... (by Major Tom)
Threading Question
 
Hello all, I have a class ChunkManager that has a few (supposed to be) asynchronous methods. These methods handle tasks in my game engine such as loading the ...
[no replies]
Using Typedef With Arrays
 
I have already defined two arrays: int songId ; char typeOfSong For my assignment we HAVE to use typedef to declare these. I tried a multitude of co...
[1 reply] : a typedef declaration has exact same syntax as a variable declaration,... (by Cubbi)
remove std::string from std::vector<char>
 
Hi, I am currently trying to remove an occurrence of a std::string from a vector<char>. Also, I have a way of finding an occurrence of a string in a vector but...
[4 replies] Last: Basically what I am doing is getting getting data from a socket and t... (by Cubbi)
class in c++
 
hi i see this code example about Friendship and inheritance in c++ tut but i don't understand this line of code class CSquare; what does it do and why we...
[14 replies] Last: It returns pointer to new instance of class Arm_Off (by MiiNiPaa)
by kiste5
explain and help me start please.
 
Declare 3 integer variables and an int array of size 3 Read the 3 variables Assign each elements of the array by assigning one of the variables to each of th...
[1 reply] : Declare 3 integer variables Presumably you can do this bit?... (by MikeyBoy)
by Alex91
merging two files
 
I am trying to output data from two sorted arrays into one file(which should also be sorted). The program works for most of the data, but after it reaches a ce...
[4 replies] Last: Thank you, I now understand the concept and this solved my issue. (by Alex91)
by seiji9
Can't total up the results calculted...
 
i am doing a sales commission program to run a counter on the commission calculated, but the answers can't show on the counter here's what i've done so far:...
[2 replies] Last: Please take a pensil and a paper and calculate what will be the value ... (by vlad from moscow)
Don't know how to make a simple thing
 
I've just started programming in C++ and so I don't know how to do a simple thing: If I set 5 random numbers from 1 to 6, how can the program know that there ar...
[2 replies] Last: Oh thanks! (by Hobgoblino)
compilation issue
 
Hi, I am compiling the code under aCC compiler and getting below two errors. 1. error 4065: Recursion in macro "rb_tree". --- [ This error is becaus...
[2 replies] Last: > If space is removed then there is no error. ¿so what's the problem? (by ne555)
April 2013 Pages: 1... 3738394041... 53
  Archived months: [mar2013] [may2013]

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