General C++ Programming - December 2017 (Page 5)

Pacman in dev c++
 
can anyone help me to create the pacman game in dev c++ using console application?I am new to c++, have only basic idea .... can anyone please help me to make t...
[5 replies] Last: // here is the move function for player void move(){ if (!kb... (by jack333)
PLEASE HELP ME WITH THIS PROBLEM
 
The file data_sales_cs.txt contains annual salary and quarterly sales data (separated by commas) for the employees of Acme Inc. The data is in the following for...
[1 reply] : Do not double-post. Other thread: http://www.cplusplus.com/forum/begin... (by keskiverto)
by Dani95
help
 
Hello i write this func to print the prime number from 2d array put when i enter for example 1 2 3 4 5 6 7 8 it print 1 2 3 5 7 how can i edit it to not print...
[1 reply] : Ah, a followup to: http://www.cplusplus.com/forum/general/226810/ Ple... (by keskiverto)
PPP2 Chapter 21 Drill 1
 
Code: https://gist.github.com/DragonOsman/55fdfe564195be3661992391c859ef40 In the debugger, I see that it correctly reads the Items and puts them into the vect...
[1 reply] : Both stoi(...) and stod(...) may throw. Note that they throw if the st... (by coder777)
Can somebody assist me with this error I'm getting with pointers
 
I am trying to create a card game for an assignment, and I'm having a read access error when trying to end this turn. header: https://pastebin.com/tAbDmyFY ...
[2 replies] Last: What values have you entered to get a read access error? (by Thomas1965)
How do I move on to the next maze?
 
Hello everyone, I need to know how to move on to the next maze. Should I create a new function or do I have to use if? #include<iostream> #include<conio...
[1 reply] : One way would be to create a class Map and store the maps in a vector.... (by Thomas1965)
Unable to find data in an array (from file)
 
Hello, first time poster. I'm still learning this forum type. My code is designed to pull data from a file, "dataset.txt" and it does. It's able to read it, ...
[2 replies] Last: no data (it displays this for about 40 more lines, I cut it out) You... (by Chervil)
Make Template Class Return Template Type?
 
Hello there! Sorry if the title doesn't explain this well. But the code should explain it. So I have a template class called NetworkVar: template < typenam...
[2 replies] Last: Yeah, ha, I'm trying to break away from C functions, but they've gotte... (by Spirrwell)
toggle keypress not continual output
 
i need to create a toggle switch and detect a keypress but not continually output to the console Update: i do not want code snippets or anything like that just...
[no replies]
Vector as a data member in Class???
 
Hi, I'm wondering how to put a vector in a class as like a data member so I can add my own functions and such to manipulate it further. Ex. class Matrix{...
[1 reply] : Looks right to me. (by doug4)
by stav
casting something from 1 byte to 8
 
When i build and run this program i get no errors: #include <stdio.h> #include <stdlib.h> struct test { int mytest; int myothertest; }; struct memory { ...
[1 reply] : You do write into (and read from) memory that you have not allocated. ... (by keskiverto)
Help me for duplicate random number.
 
Hi, I am new here and Im looking for some help. I am trying to make my array without any duplicate number. #include <stdio.h> #include <stdlib.h> #include <...
[1 reply] : I don't see a question. To respond to your statement "I am trying to ... (by SamuelAdams)
by Shades
Adding libraries, header paths to G++
 
I am trying to add SFML to my C++ projects. I am running Mac OS, Emacs for my editor and G++ as my compiler. Emacs is just a text editor, so I need to add paths...
[1 reply] : Assuming that the file /Users/Me/Documents/Project/SFML/Graphics.hpp ... (by Repeater)
by orphic
a c++ prog that emails you whats written in it
 
huy guys i need to write a program in c++ that takes what somebody writes in it (command prompt) and emails me that thanks
[1 reply] : Just use getline to read the user input and store it in a string. To s... (by Thomas1965)
Inheritance. Not really sure were to start on this. Please help!
 
must create a program that includes user interaction and employs, Object Oriented Programming and Inheritance, File Handling Classes, and some type of data obje...
[2 replies] Last: Using inheritance is important although it might produce high complexi... (by benhart)
makefile problem with 2 Dirs, 3 header Files
 
I have 2 Dirs and 3 header files stored in them, as follows: Dir A : contains Header files A and C Dir B : contains Header file B Dirs A and B are sub-directo...
[no replies]
Using boost::filesystem
 
Hi, I am trying to use boost::filesystem libraries for operations like copy directory, copy file, etc. However I am getting linker errors as soon as I make a ...
[6 replies] Last: Do other parts of boost work? Maybe this helps? https://stackoverflow... (by Ganado)
by Dani95
find prime numbers in 2d array
 
Hi... How to find a prime numbers in 2d array and put the results in new array
[1 reply] : https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes (by kbw)
Problem with Switch statement
 
Can someone explain to me what is wrong with this switch and how I can go about fixing it? class getVehicleType : public Vehicle { string v = ""; swi...
[5 replies] Last: https://blogs.msdn.microsoft.com/oldnewthing/20140116-00/?p=2063 Appa... (by lastchance)
Binary Memory Stream?
 
Hello there! So basically I'm looking for functionality akin to std::ifstream and std::ofstream, but instead of writing\reading a file I want to write\read mem...
[2 replies] Last: Someone on this forum (I don't remember who) provided a way to use str... (by doug4)
December 2017 Pages: 1... 34567... 13
  Archived months: [nov2017] [jan2018]

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