General C++ Programming - August 2017 (Page 6)

How to initialize a static std::map in a cpp file?
 
Hello++ I'm trying to initialize a static std::map in a cpp file. I looked at https://stackoverfl...
[3 replies] Last: A variable can only be declared as static (in the header). You need to... (by coder777)
Help with name of sorting algorithm
 
Hi all, A question has arisen on an old exam paper used for revision which asks about a type of s...
[4 replies] Last: I like the name 'winding', but the sort you are looking at is a varian... (by Duthomhas)
C++ 17 Parallel Sum
 
Following web site has small program to parallel sum elements of Vector: < http://en.cppreferenc...
[10 replies] Last: > Is there a freely downloadable latest compiler such as g++ with all ... (by JLBorges)
String Code, Shipping Charge based on Region Code
 
Write an introductory C++ program that displays the appropriate shipping charge based on the region ...
[6 replies] Last: I put the stdafx.h first like you suggested and it fixed it all. That ... (by Ludicrousenigma)
String Code that shows Reverse Order of what is Input
 
Write a program that accepts a strong of character from the user. The program should display the cha...
[6 replies] Last: Thanks so much! (by Ludicrousenigma)
Read Entire Line from File and Add to String
 
So this is an easy one I'm sure. I've Googled around and tried some thing but haven't got anywhere s...
[4 replies] Last: Figured it out. Thank you everyone for the responses. void Tools::Di... (by VirtualizeThis)
String Code using a sentinel value
 
I have to write a program that allows me to enter three separate strings: a city name, a state name,...
[2 replies] Last: Yes! Runs perfect now. Thank you so much! (by Ludicrousenigma)
by Handge
How to make text health bar
 
How would you go about to making a text health text bar? I want it the contents inside the {} to dep...
[1 reply] : About color output: https://www.codeproject.com/Articles/24896/JLib-A-... (by Thomas1965)
Error C3867 assign': non-standard syntax; use '&' to create a pointer to member
 
First post, not a big user of forums so please excuse any issues. I'm having an issue with one of m...
[4 replies] Last: Thanks JL. That's perfect! (by VirtualizeThis)
Won't let me divide/what's wrong?
 
My code won't let me apply the division 'x/365' there are other mistakes... #include<iostream> ...
[3 replies] Last: Please note some of the maths errors too: hyperbolic cosine (cosh) is ... (by lastchance)
Preprocessor or lexical analysis
 
The following transformations takes place in Lexical Analysis or Preprocessor makes it? 1) Omitting...
[1 reply] : Prerocessor. It probably took you more time to ask here on the forum ... (by Duthomhas)
Circular include. Expected name-class before '{' token
 
This is my code: main.cpp #include "game.h" #include "human.h" #include "AI.h" #include "r...
[1 reply] : Basically a duplicate topic: http://www.cplusplus.com/forum/general/22... (by jlb)
Anyone please help me to correct the "declaration syntax error."
 
#include<stdio.h> voidmain { int u; float b=100.00; cout<<"/n Enter units(u)"; cin>>u; if(u>0...
[1 reply] : The first few lines: #include<stdio.h> voidmain { should look som... (by Chervil)
array char[] error :(
 
Hi guys, i have a problems understanding about array char but it was required in my code to have a a...
[1 reply] : The code above doesn't compile, there are numerous errors - missing cl... (by Chervil)
Circular include. Expected name-class before '{' token
 
Hi, I'm new to programming. I'm trying to make a RPS game but I'm having trouble with the circular i...
[2 replies] Last: Please post the complete error messages, all of them, exactly as they ... (by jlb)
Output deck of cards not aligned, why?
 
Trying to display deck of cards, but they aren't side by side; rather they have gaps in the next lin...
[2 replies] Last: Another way using cstring funcionality to copy and join C-style string... (by closed account 48T7M4Gy)
Invalid conversion from ...<char> to int
 
Hi, I am imitating a queue using a linked list. I created a struct node, then I created a struct cal...
[1 reply] : The expression A ? B : C is an expression, not an statement like if(A... (by Cubbi)
by hav206
is there another faster way to delete a string
 
// // main.cpp // characterRemover // // Created by Van Ha on 6/7/16. // Copyright © 2016 Van H...
[7 replies] Last: > is making the bool table static and clearing faster than recreating ... (by JLBorges)
by DNS323
Creating a csv file in a particular folder
 
Hello all, I am new to a c++ programing and currently working on my college projct. I have to cre...
[9 replies] Last: @Thomas1965 Hey, Thanks. It is working well. Thank you very much. I ha... (by DNS323)
How to access the protected variables?
 
I cannot access the protected variables even within a derived class. #include <iostream> us...
[3 replies] Last: Hi, There probably isn't much point in making the variables protected... (by TheIdeasMan)
August 2017 Pages: 1... 456789
  Archived months: [jul2017] [sep2017]

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