General C++ Programming (Page 13)

by Mallet
Quick ifstream & ofstream Question
 
Hey guys! So I wrote the proper program my professor wants. Now she needs me to copy that pr...
[5 replies] Last: Thanks for the feedback! (by Mallet)
by Dani95
How to convert string array to ascii
 
Hello how to convert 2d string array to ascii? This is my array string n = { { "1", "2", "3"...
[5 replies] Last: I'm pretty sure guessing that OP means convert the string "23" into ... (by Ganado)
Why do I get expected a ')' before the 'y' in if (compare = 'Y' || compare 'y')
 
How do I fix the error I get? This is only a section of my code the entire code is 400 plus lines...
[3 replies] Last: Line 6: There is no cin of compare. PLEASE ALWAYS USE CODE TAGS (the... (by AbstractionAnon)
Need to slove c++ error as soon as possible
 
Hello , I need to create a program to simulate waiting time, and I am following à tutorial on dat...
[2 replies] Last: Thank you a lot now I understand well, and it is okey now Thanks (by Mar1990)
Problem function calling, with compilation options
 
hi! I'm developer of a program designed to provide features for games under GoldSrc (Half-Life #1 b...
[6 replies] Last: Sorry I didn't reply yesterday. I was totally wiped from training and ... (by helios)
Help Needed in completing STL-like list class
 
I have this code here in the following Gist that implements an STL-like list class: https://gist.git...
[6 replies] Last: Why would it cause confusion? I thought that providing a default argu... (by DragonOsman)
Why does the string become a loop?
 
I am trying to make it so it replaces every r in a word with 3 r's. Ex: there }
[4 replies] Last: @restinpasta, Please don't delete your post: people took trouble to a... (by lastchance)
by Dani95
How to find odd and even numbers in string array using func
 
How to find odd and even numbers in string array and put the odd number in array and even numbers in...
[1 reply] : 2 ways... you can convert the strings to integers and use %2 or you ca... (by jonnin)
HELP WITH PROJECT c++ (Array, string file, sort)
 
Okay, I have this project due today. I have written the codes. I need to read a .txt file and put i...
[1 reply] : On line 78: why are you comparing an integer with a string? minValue i... (by goldenchicken)
by ed13
Infinite for loop
 
I'm having some odd results in the following code: while (shapes.size()>1){ for (...
[5 replies] Last: I've found that a simple (int) cast does the trick and stops size from... (by ed13)
by haley8
CGPA
 
#include<iostream> using namespace std; void Introduction(string, long); float CalcGPA(float, floa...
[1 reply] : I couldnt run it. What do you mean? Does it fail to compile? If so... (by MikeyBoy)
How to Prevent TLE from happening even after unnesting loops
 
My code ended up with TLE even after i unnested loops. I had switched algorithms between versions bu...
[4 replies] Last: Ok here's version 3: https://pastebin.com/xEFesV00 (by includebits)
Encoding
 
Hey, I wrote this code and trying to decode the codes that I have in my packets.dat file. In the pac...
[no replies]
!! Due in 4 hours !! Recursive function
 
Hi! I have an assignment it's called the Markov-Chain. In principe I have a Directed Graph with 10 ...
[2 replies] Last: There are 2 "Fische". You can see this at the init_graph function at t... (by lekfanda)
Why is this code "disgusting"?
 
In the book PPP2, there's a "Try this" exercise that says: Why are we so disgusted with that use of...
[3 replies] Last: v is not very descriptive. If I saw code like that I'd just delete it... (by SamuelAdams)
Why is my minimax algorithm not working?
 
Hi, I am a new user here and I would like somebody to help me with my minimax algorithm. I have been...
[6 replies] Last: Yes Peter, you are right, I wasn't returning a score at the end of the... (by Chris LF)
Singleton Instantiation Syntax
 
I am using VS2017 on Win Pro x64. I am having trouble with the proper syntax for instantiating a ...
[6 replies] Last: This is not true. Thank-you for correcting me. Actually, I meant ... (by doug4)
i need some explanation about the exceptions.
 
Hello everyone. i've got a several questions in my mind,but first take a look at this code: cla...
[1 reply] : 1-)why does the what() method returns (const char*)? So you can use ... (by Repeater)
How to pass size of an array from command line
 
Is there any way to pass the size of an array using a command prompt. #include <iostream> using ...
[4 replies] Last: Your code at line 8 int arr ; is not possible in standard C++, beca... (by Chervil)
Pages: 1... 1112131415... 18
  Archived months: [nov2017]

Cannot post in this page. To post a new message, go to the first page.