General C++ Programming (Page 7)

by Usm6rn
Letter Count.txt
 
I am trying to print and find the most and least common occurrences of the characters in the file (l...
[3 replies] Last: Actually, you've ignored almost the entirety of my post, @Usm6rn. PU... (by lastchance)
Enumeration Philosophy
 
I know enums have been spoken about in many threads. I am hoping to not only learn from these thread...
[9 replies] Last: Thank you for confirming, what I should have already known. (by perezprograms)
Creating a grid with rows and columns using vectors
 
I want to create a grid with empty rows and columns and I did the following function. grid(unsigne...
[4 replies] Last: Your vector stuff is local to the grid function. When you exit gri... (by doug4)
LNK2019 unresolved external symbol
 
I'm getting 65 errors on a file in a program I'm trying to compile. I've posted 7 of them below as ...
[12 replies] Last: I did a quick google, and found this shor YouTube video that sets up t... (by doug4)
by benjm
Redrawing portions of ncurses window border
 
Hey guys, trying to figure out the best way to redraw a window border once a portion of it has b...
[1 reply] : Actually figured this out using mvwvline (win, line, winWidth- 1, ACS... (by benjm)
file
 
I have made this code and it does not let me put in my file name. The compiler automatically goes aw...
[2 replies] Last: @sonia123 Please specify your problem, as your description made no se... (by jjojehong)
'std::bad_alloc' what(): std::bad_alloc
 
So, how can I fix this error? Here's my code: note that sizes =1239 and it's from a vector of obj...
[1 reply] : Which line is the exception thrown from? (by Peter87)
Vector3 Class
 
I'm new to programming and I have an assignment where I have to make I Vector3 class. I finished mos...
[4 replies] Last: Now that we get there, this won't do what you probably expect it to do... (by keskiverto)
by rcx11
Coding convention: Repeat code, or highly specilized conditions
 
I'm working on outputting a dynamically generated table that would be capable of printing values wit...
[2 replies] Last: Another possibility is to create a table class structure. Have a bas... (by doug4)
Custom Comparator for std::binary_search
 
I'm trying to use the STL's binary search in <algorithm> but unlike other functions that take a comp...
[2 replies] Last: You can even wrap your compare easily with a lambda: std::sort( vec.b... (by keskiverto)
Bonus Program
 
HI my name is Jeff and i'm new to programming and im trying to work on a class assignment but im stu...
[2 replies] Last: 3. http://www.cplusplus.com/forum/beginner/ (by Syvel)
Collision detection problem
 
Hi guys, I'm having problems with collision detection in SDL, the ball seems to get stuck sometimes...
[5 replies] Last: Lets assume that one step (D) is 10 and wall-ball-distance < 5 is "col... (by keskiverto)
New Topic Screen broken for anyone else?
 
I can't submit a new topic. None of the formatting buttons work. The length and preview buttons ar...
[6 replies] Last: I know code tags are <code> <\code> This forum uses BB Code, not H... (by FurryGuy)
I have a function that presumably leaks memory but I can't see where!
 
Hi, The code below is reported by C++ Memory Validator to produce a leak, but I don't see how! ...
[5 replies] Last: sure: #include <iostream> #include <codecvt> #include <locale> #inclu... (by Cubbi)
Flight finder C++
 
Note: This program works as intended to. Thanks for the help I am having trouble finding adding a...
[7 replies] Last: This fixed the data structure: f.vertices = cost; c.vertices ... (by bigJoe561)
Help with files and counter
 
This code is suppose to read a file with student ids and their test scores which then gets an averag...
[1 reply] : Let's look at this snippet: void readscore (int &id, int &test, int &... (by jlb)
by Lyrix
Which one cause std::bad_alloc
 
Thx class Solution { public: vector<string> solution; vector<string> findItiner...
[1 reply] : The scope of solution is incorrect. Your bad_alloc can happen in s... (by kbw)
problem with a cubic function code
 
I am a beginner with c++ and am experimenting with functions. I am trying to create a code that give...
[6 replies] Last: You can find the full method here: https://imgur.com/a/kX2mno3 Coded,... (by lastchance)
SIGSEGV on codechef
 
I submitted this code for this challenge https://www.codechef.com/problems/CHEFCHR and got a SIGSEGV...
[3 replies] Last: @Peter87, @keskiverto, thanks it's working now. I even got 100% :) He... (by Thomas1965)
Constructors
 
In c++ if I define a class to have a default constructor as well as a parameter based constructor bu...
[2 replies] Last: Look at the C++14 tab in http://www.cplusplus.com/reference/vector/vec... (by keskiverto)
Pages: 1... 56789... 16
  Archived months: [aug2018]

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