General C++ Programming - June 2016

push/pop printing issue
Hi, how do I print the value being popped or being pushed just to follow what's going on? I get windows error(below). I can print nStack.top() fine. Just not th...
Jun 30, 2016 at 10:06pm
[7 replies] Last: Look at your error message: In function 'int main()': 23:19: error: i... (by jlb)
Help with finding errors in tic-tac-toe program
I am working on trying to teach myself C++ with the book "Beginning c++ through game programing 3rd edition". I am working on the tic-tac-toe program from the ...
Jun 30, 2016 at 6:21pm
[3 replies] Last: UchihaKite Thanks for the help went back and looked where you pointed... (by Rosebudjfg)
Reading a txt file to check if there is word
Hello all, Thanks in advance for your help! I am writing a program to read a file and check if there is word in it. A part of the text file looks like this: B...
Jun 30, 2016 at 5:04pm
[3 replies] Last: The program's main purpose is to check whether there is a word in a c... (by Half Life G Man)
by doug4
Creating a Random file of fixed size
I am interested in creating a fixed size file (~25M) with random data. I am currently considering copying data from /dev/urandom into my file. I am familiar ...
Jun 30, 2016 at 2:38pm
[13 replies] Last: @doug4 It was just example code, I figured you knew to delete a 25Mb... (by Xerxes004)
Determining if a type has a certain method??
Hi, i am writing a template that detects whether a type has a certain method (call it Do). So far I have the following: using bridge_type = void; // ca...
Jun 30, 2016 at 1:48pm
[12 replies] Last: @JLBorges, Yes, I am stupid. I hope that was tongue in cheek. You... (by doug4)
by Medino
Reading a two dimensional array with two wile loops
Hi there it seems that these two while loops can't read my 2D array. What's causing it, I know it's my faulty programming but what exactly? #include <iostream...
Jun 30, 2016 at 11:49am
[6 replies] Last: Ok, thanks again. (by Medino)
Artificial intelligence Tic Tac Toe game with C++
Artificial intelligence Tic Tac Toe game with C++ I use only iostream library. I hope that helps. Project and code : Project Page : http://www.ardamavi....
Jun 29, 2016 at 9:55pm
[no replies]
draw and display bitmap
I'm reading the coordinates and the color of the pixel from a database file , what I need is an way to make a image with this values , can you suggest something...
Jun 29, 2016 at 7:52pm
[no replies]
Re-initialising srand without exiting
Currently creating a basic RPG as a side hobby. I have two classes which will battle and have decided to give them integer values for damage and apply a modifie...
Jun 29, 2016 at 3:13pm
[2 replies] Last: TL;DR: You're wasting time. Just call rand() to get a random numbe... (by Duthomhas)
Help with this equation please ....
Please see the link below which has the equation. http://i.imgur.com/2st6U9Zl.png Can anyone help explain this equation to me ? Thanks
Jun 29, 2016 at 2:42pm
[1 reply] : that's quite ugly, ¿can you improve it? Basically you need to sum a ... (by ne555)
by Zapeth
Why is printf not printing this correctly (but cout is)?
So here's a short overview of what I want to use -> http://preshing.com/20150324/safe-bitfields-in-cpp/ And here is the definition/implementation of the code t...
Jun 29, 2016 at 1:30pm
[3 replies] Last: But then what is passed to the printf function without the explicit c... (by cire)
by rpsalh
program not running
/*Program to count the number of lowercase characters entered*/ #include<iostream> #include<stdlib.h> #include<stdio.h> #include<ctype.h> using namespace ...
Jun 29, 2016 at 9:06am
[2 replies] Last: Thanks now it is working as it should.Yeah, one more question will it ... (by rpsalh)
C++ programming (1,2)
Write a program in C++ to prepare a frequency distribution table of the percentage marks in Computer studies of N students, to be taken as inputs, into the foll...
Jun 29, 2016 at 6:55am
[33 replies] Last: Well done suresh - at last some success. :) (by closed account 48T7M4Gy)
Programming outside the command prompt
Okay, so I've been working on my programming a lot lately and feel like all my work is being wasted on only having my code come only get built and ran in the co...
Jun 29, 2016 at 4:45am
[2 replies] Last: Wow, I didn't expect anyone to give me so much information! But I alwa... (by YvngSavage)
by rpsalh
cin vs getchar()
i was trying to make a program it worked good with cin but not with getchar please tell. /*Program to read a character and display its next character in the A...
Jun 29, 2016 at 4:43am
[5 replies] Last: thanks got it (by rpsalh)
SFML or Qt
hello guys! I have to developer a game with c++ programming language it is a tower defense game what is the best library to develop this game? sfml or qt? ...
Jun 29, 2016 at 4:16am
[5 replies] Last: Yes, SFML is probably preferable. (by helios)
Operator overloading
For a simple struct like struct MyObject { int number1; int number2; } Do I have to implement += operator if I already implemented operator + , i...
Jun 28, 2016 at 3:16pm
[8 replies] Last: Hi Helios, my bad. You are right. It is overloaded by someone else an... (by chrisben)
std::unordered_set speed comparison with vector (1,2)
For some reason this container is creating more buckets than elements that are in it :+( #include <iostream> #include <iomanip> #include <vector> #inc...
Jun 28, 2016 at 2:51pm
[20 replies] Last: > Most all the containers have begin iterators (except the Container A... (by JLBorges)
Standard To Military Time
I'm pretty sure something is wrong either in my timeOfDay() or convertTime(), because what the heck. #include "stdafx.h" #include <string> #include <io...
Jun 28, 2016 at 4:59am
[9 replies] Last: Oops - all fixed, thanks w1 (by closed account 48T7M4Gy)
Best option for loading data
Hi, I'm looking for a library for loading map and player data for a videogame. I've looked at using the general c++, but I'm wondering if there is a better a...
Jun 28, 2016 at 1:15am
[1 reply] : Sorry about that, OP. Some disruptive user or users would appear to be... (by helios)
June 2016 Pages: 123... 14
  Archived months: [may2016] [jul2016]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.