General C++ Programming - January 2017 (Page 2)

c++ program
 
hello everyone I am trying to make a program which identify the format and only take the specific ...
[6 replies] Last: you want to read the substrings only if the regex_match returns true (by gunnerfunner)
Convert String to Integer With Error-Checking
 
I want to convert a string to an integer and validate that it is an actual integer. The following is...
[4 replies] Last: Thank you. You've made me rethink some of my logic and clean up my cod... (by TheNoviceDev)
Why does std::cout.flush doesn't flush at the end of a loop ?
 
Hi everyone, here's the piece of my code relevant for this question: int speed = 5*n/100; for(i...
[6 replies] Last: By the way, in my .bash_aliases I have set: alias g+='g++ -Wall -Wex... (by TheIdeasMan)
Need Help With This :(
 
Iv'e been trying to solve this for a couple of days now and i cant seem tosolve it. Joe’...
[5 replies] Last: Change PIrr to PI * r * r Multiplication is not implicit; in orde... (by mbozzi)
Just getting started
 
I am getting started in C++ programming and going through some tutorials. I am trying to brush up o...
[1 reply] : Essentially it's telling you to create a function that takes 3 paramet... (by Hengry)
plz double check - is this correct way
 
Unintended consequences for this setup or am farming the function out correctly? fx.h * * Cre...
[5 replies] Last: It seems you dont have to include .cpp files though? Right. If you'r... (by cire)
Help removing one line of code from output!
 
Hello I am trying to have my output not write the first line of code, it's the reason my project kee...
[no replies]
Function to find largest number out of a group
 
So, i put together a quick code, and i need to be able to find the highest value out of a bunch of i...
[6 replies] Last: Okay, that sounds good, thanks. I'm looking at sorted maps right now ... (by rfitz123)
by King39
File Encryption Bug
 
Decrypted file has the same message as the original except it adds a few letters (usually 2). For e...
[4 replies] Last: ty (by King39)
How should I search this?
 
I am trying to find forms using C++ and OpenGL to make a checkerboard and have users click within a ...
[2 replies] Last: I see makes sense. I know also using an array in my case helps. I am j... (by raboki898)
Seg Fault and not sure why?
 
#include <iostream> #include<fstream> #include <ctime> #include <string> #include <unistd.h> using...
[2 replies] Last: Ah so not returning a string cause the seg fault? Thanks for the help ... (by ryanismyname)
problem 78 project euler
 
Coin partitions Problem 78 Let p(n) represent the number of different ways in which n coins can be s...
[2 replies] Last: Don't know if this is the fastest way; one approach is to generate par... (by JLBorges)
the same meaning?
 
I am reading materials about cpp memory model. The two snippet codes have the same meaning? s...
[4 replies] Last: Thanks (by gunnerfunner)
How to rewrite following C++ code into C code?
 
How to do this in C? Please write entire code, because general hints don't help me. #include...
[1 reply] : Duplicate request... http://www.cplusplus.com/forum/beginner/207217/ ... (by whitenite1)
Method 'setprecision()' does not work!
 
In following code setprecision(11) does not work at all, it prints 41.3328 - not 11 digits !What is ...
[1 reply] : In following code setprecision(11) does not work at all, it prints 41... (by Mantorr22)
by rizan
help me fix the following code pls
 
please help me fix this code, //Hospital doctor information system #include <iostream> #include...
[11 replies] Last: this still appears to have errors pls fix thank u OK rizan, I think ... (by closed account 48T7M4Gy)
by c320
What does this mean *((int*)(&val) +1)
 
Hello, I'm trying to understand this line of code. Can someone help me? Is it saving the result ...
[2 replies] Last: You did not show the type of val. It does not affect the explanation,... (by keskiverto)
Youngest C++ Programmer you've talked to
 
Currently i'm 12 and I know a lot of C++, but this made me wonder, who's the youngest C++ programmer...
[2 replies] Last: Not sure if he used C++, but that's the youngest I have heard of. htt... (by Golden Lizard)
How to use a makefile
 
I've written a makefile and saved it under the name "MakeFile" (provided below) for my program. It's...
[1 reply] : If you want to specify which makefile to use you can do so using the ... (by Peter87)
Program help!
 
Hello, How do I make a program does this: dividing 115/45 and it only prints the whole integer whi...
[2 replies] Last: Super simple version of this: int main() { // assigning a de... (by TheNoviceDev)
January 2017 Pages: 1234... 13
  Archived months: [dec2016] [feb2017]

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