General C++ Programming - December 2016 (Page 4)

Function trouble
 
I am trying to make a user choice based game that uses functions. this is biting off more than i can chew so to speak. I'd like to be able to show this to my te...
[5 replies] Last: Bit late for the party but nevertheless. (It remains to be seen why ... (by closed account 48T7M4Gy)
arrays
 
I an having a problem coding this program. Can Somme please put me through. Write a C++ program to read in two dimension arrays A and B from a file and s...
[1 reply] : Please don't double post: http://www.cplusplus.com/forum/beginner/2051... (by gunnerfunner)
Can anyone give me code for this one? I'm new in programming and don't know how to do it.
 
Write a main function together with a collection of functions that operates on a twodimensional matrix (a global variable) with ROW_SIZE rows and COL_SIZE colum...
[1 reply] : Lots of info here: https://www.google.co.uk/?gws_rd=ssl#q=2d+matrix+c%... (by gunnerfunner)
Help Please
 
//======================================================================================== // Name : area.cpp // Author : // Version : // Copyright : Your c...
[1 reply] : Where's the definition of PickShape() and please use code-tags (by gunnerfunner)
Undefined reference
 
I am still new to this so I do not know how to fix the errors. When I compile, I keep getting the errors "Undefined reference to 'Pokeball::Pokeball()", "Undefi...
[1 reply] : These errors indicate that you've declared some function prototypes, b... (by xismn)
by Pearrr
Access violation error when using -operator
 
Keep getting an access violation error every time I try and take one matrix from another in my main for loop. (Large - Wld).. Can anyone offer any guidance as t...
[9 replies] Last: double delete, uninitialized pointer, out of bounds access... run your... (by ne555)
deconstruct object from pointer array might not release memory?
 
I am having a strange C++ new/delete question which is at some circumstance I delete (deconstruct) an object from pointer array but the memory seems not to be r...
[8 replies] Last: I don't have exact same linux (the box I'm trying this on still has gl... (by Cubbi)
Ship lenght
 
Hi there, I need to find the ship length and return its coordinate(the end of the ship). I need to create recursive function, but it is really hard to figure it...
[9 replies] Last: Not quite. You're checking to see if a ship is present, but what's to ... (by dhayden)
STL container map trying to get the last iterator of map
 
Hello , I was trying to access the last element of the map using an iterator using below approach std:: iterator last_butone_elem = someMap.end(); for (...
[7 replies] Last: Thanks a lot JLBorges , With an example with templates , you made my... (by mog4kor)
Scaling an integer?
 
Is there a function that allows you to scale an integer to another one? For example: int a; //int with a value between 1-100; int b; //int with a value betwee...
[2 replies] Last: Sorry, you're right. My brain was foggy. Here's the code if anyone nee... (by InsanelyNormal)
A question in memo and personal information encryption?
 
Hi. If I want to encrypt my personal information on my computer and save it, what type of encryption do i use to encrypt it? So no one on earth can break it. ...
[2 replies] Last: Thank you coder777 (by omer123)
c++ class design
 
hello, im writing a game, but im not sure if my classes has a good design would this be a good design for my class? class Map { Map(filename) : mapname(...
[6 replies] Last: @Cubbi @doug4 hello so i ended up doing this design http://pastebin.co... (by xenovia12)
A question in Saesar Cipher?
 
Hi, I have written a very simple Saesar Cipher, but at the end of the program it crashes, why? What do you suggest to improve it? That's the code: Sorry, I cou...
[2 replies] Last: Thanks Peter87. (by omer123)
friend declaration specifying a default argument must be a definition error
 
I am making a chess program and I am having trouble getting the pieces to move when you click on them. I keep getting an error saying "friend declaration specif...
[14 replies] Last: @OP Why not save yourself a whole lot of trouble and just go back to a... (by closed account 48T7M4Gy)
by OHYEAH
a C++ suggestion while, also loop?
 
Ok So I want to make a thing that continuously adds 1 to a variable, but doing a while loop stops the whole program. Then I got thinking what if there was a "W...
[16 replies] Last: > I'm guessing that is for making the while also loop. Yes. Just for ... (by JLBorges)
unordered_map as an hash
 
I was under the impression that unordered_map could be used as a hash map in c++. But looks like my assumption was wrong. Can someone pointed me in the right di...
[4 replies] Last: yes, that is what I am facing, any work arounds to fix that? I was thi... (by funprogrammer)
by gary2s
how to convert unsigned char to c# byte array
 
I am Java/C# developer and working on JNI. I have one c++ wrapper and need to convert c++ unsigned char to c# byte array/byte . I have no idea how to convert it...
[1 reply] : Have a look here maybe it will work for unsigned char as well: http://... (by Thomas1965)
c++ template problem
 
template<typename T> void ResourceManager<T>::load(const std::string& filename) { typename std::vector<std::pair<std::string,T>>::iterator iter = getIt...
[6 replies] Last: @Cubbi oh shiit! i didnt notice it lol thanks for that. (by xenovia12)
return static template class object
 
so i have a singleton class and this function is what i use to get the instance of my ResourceManager class. static ResourceManager& getResourceManagerInsta...
[4 replies] Last: @gunnerfunner thanks ! (by xenovia12)
Array with row/col wont stop running
 
//Once I run this it just keeps going and I don't know why. any help would be cool #include <iostream> #include <cmath> using namespace std; const int rows =...
[3 replies] Last: Wow that was so dumb of me thanks. Plus fixed code tag I hope, first t... (by bozmanbeyond)
December 2016 Pages: 123456... 18
  Archived months: [nov2016] [jan2017]

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