General C++ Programming (Page 3)

Passing Structures to Arrays
So I know that there are topics about this already, but I have seen none that help with my specific ...
[8 replies] Last: With your while do while switch, it's easier to put the switch in a lo... (by TheIdeasMan)
C++ File handling help needed
The following program is actually written to count the number of alphabet in a .txt file. But the pr...
[7 replies] Last: You might also try Coliru (This is @gunnerfunner's solution) :) http:/... (by mbozzi)
How to use namespace in different files
// 1.cpp //------------------- #include<iostream> namespace np { int i = 0; } //-------------...
[8 replies] Last: @doug4 The ability to inline variables was (will be) added in C++17: h... (by mbozzi)
Infinite loops issue
when i compile and run this, It continually loops and never ends, can someone explain why? string...
[2 replies] Last: I changed the variable answer to "no" and used && instead of or st... (by Zachphilipp)
Interview Question Trap!
There's a trap in interviews today, and I'm wrestling with how to address it. Let's take for exampl...
[3 replies] Last: as an interviewer, I would love it very much to see you throw a well-d... (by Cubbi)
How to share info between two functions without using global
#include <iostream> using namespace std; void first(), second(), third(); int main() { first(int a...
[3 replies] Last: @OP - There are a number of problems with your code: Line 4: Your fu... (by AbstractionAnon)
Convert console app to Win32 app??
I have this console application, that converts simple words into complex passwords and would like to...
[3 replies] Last: This is probably overkill for what you're doing, but might give you so... (by AbstractionAnon)
sorting parallel vectors?
For PPP2, I have to do an exercise whose specs are as follows: Read five names into a vector<str...
[12 replies] Last: Thanks. That helped. I got it. (by DragonOsman)
Create Desktop Icon to Execute C++ Code
Hi, I have tried various ways to start C++ & Unix (Mint)and struggled. I have programmed Expert ...
[7 replies] Last: Gotcha - works fine. (by peterhw100)
How to divide the input taken from user in two parts and assign them to two different arrays in C++?
Hi Guys, basically if we take the input from user by asking him, like below: cout << "Enter your ...
[5 replies] Last: I assume this is one of this horrible C++ courses where you have to u... (by khaw235)
Branch and Bound Assignment Problem
Hey guys, I started doing an Branch and Bound algorithm for Assignment Problem and i have some prob...
[no replies]
by SCB3
Weird Error at runtime ( 0xC0000005: Access violation reading location 0x00000000.)
So I've been struggling to understand why I'm getting an error like this and I'm really not sure how...
[3 replies] Last: @ SCB3 Consider using a range based for loop rather than begin and ... (by TheIdeasMan)
Printing a type description works inversely for arrays!
Hi, I have the following code: template <typename T> struct type_description; template<...
[7 replies] Last: Hi!! I thought I would support for reference to functions receiving a... (by JUAN DENT)
files in c++
hey guys i have 2 files ( students.dat and grades.dat ) students.dat : ID number followed by a fir...
[13 replies] Last: @kemort Eh, don't mind what @jlb said. After all, I'm learning from mi... (by Troaat)
by hale
Need help with TGA files...
Hey Guys, I need a help in opening the TGA image file, resizing to half of its original size and ...
[no replies]
Loop not compiling correctly
My loop is not working
[3 replies] Last: #include <iostream> #include <string> #include <iomanip> #include <l... (by gunnerfunner)
How can i improve this code? Cola Machine
So I was doing some exercise and cam across cola machine.. #include <iostream> #include <ioma...
[4 replies] Last: The tutorial on this site is very good: (by AbstractionAnon)
Array and Char with function (1,2)
Hey everybody, Updated version(11.01.2017) I have to do something for Array() at Line ...
[36 replies] Last: Updated* ( Please check first post) Can I ask, I have to create and... (by mrbaki1)
Help Me Solve This Linear Search Problem
Okay, so i am a beginner and i am trying to learn solving some problem then i saw this problem on ht...
[7 replies] Last: Maybe there's a problem with the way I express myself. 1. Instead of p... (by Chervil)
custom iterator for a hash table
I am trying to build a custom iterator for a hash table. How can i make the ++ operator move to the ...
[2 replies] Last: You've taken on a fair challenge here: (a) you need to first provide y... (by gunnerfunner)
Pages: 12345... 26
  Archived months: [nov2016]

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