Beginners - July 2017 (Page 9)

by TheArk
Menu program with functions
 
any idea why the compiler says that my const ints are not declared in my code? Or any suggestions on routes to take next to completing the assignment? The Dire...
[6 replies] Last: Hello TheArk, Just an observation here. Looking at your program you a... (by Handy Andy)
by Tobruk
Unexpected request for user input while executing cin.ignore()
 
I was debugging my code because a strange, out-of-place request for input was showing up, before my real getline. Upon closer inspection, I lost track of the ye...
[3 replies] Last: I'd start by rearranging your loop to use a while() loop instead of th... (by jlb)
checkBoard function
 
So I am working I'm trying to get enforce the rules of Sudoku in my code. I was wondering if I could just implement this test in my editBoard function or make a...
[15 replies] Last: yeah we haven't gone over bit maps at all, so is there another way I c... (by alextexasfan12)
by ebii
Composition
 
im having a diffcult time to understand this copmosition for some reason be happy if someone can direct me #include<iostream> using namespace std; class poi...
[6 replies] Last: thanks alot kesk but i mange to understand what was wrong without usi... (by ebii)
connect to SQL Anywhere 17
 
I've been successfully using SQLAPI++ to connect and execute SQL statements against Oracle 11.2.0.4 and PostgreSQL 9.6.3. I've had no joy with SQL Anywhere 17 ...
[no replies]
by Tobruk
Stream exceptions
 
std::istringstream iss; iss.str(*line); // stream syntax: value>value for (int z=0; z<2; z++) { iss.clear(); // clear flags from previous iterations std::ge...
[3 replies] Last: I suspect that *line doesn't contain what you think it does. Here i... (by dhayden)
C++/SFML music change speed/tempo?
 
Whats the easiest way to play music and change its temp/playback speed with C++ or SFML? Thanks in advance! //... //Something like this: music::load.fil...
[2 replies] Last: yes, but i want to change the tempo/speed of the music, i'll ask there... (by CosminPerRam)
what happens after memory leaks ?
 
hi I just want to ask what happens when I close a program with memory leak ? is the memory returned ?
[9 replies] Last: haha guess now their gates are gone they have to be more active (by Flaze07)
by Tobruk
function return extern custom_namespace::enum
 
I have these enums declared and defined in globals.h : // I enclosed the enum in a namespace to avoid warnings about ambiguity of just "match" - "match::matc...
[4 replies] Last: main.cpp: #include <iostream> #include <limits> #include "word.h" v... (by Enoizat)
mutable mutex
 
Hi I'm working through the book "C++ Concurrency in Action" by A. Williams and would like to better understand the use of mutable mutex's. On pg 74, listing 4...
[3 replies] Last: That's right. Herb Sutter calls that "The M&M Rule": mutex and mutable... (by Cubbi)
Diffirent methods in the class trough pointer
 
Hallo. I will make the class with diffirent methods. I make this by this manual http://alenacpp.blogspot.ru/2007/04/blog-post.html class My_class { publi...
[4 replies] Last: Now I will make functions with diffirent parameters: void fn_1(My_ty... (by dhayden)
by zeda
Reading data from text file
 
I am working my way through "Starting out with c++" by Tony Gaddis. I created a .txt file with only "100" entered there and tried to read the file using c++ wi...
[3 replies] Last: Thanks jonnin for your kind help and Enoizat thanks for your tip. (by zeda)
What is the difference between cout.precision() and setprecision()?
 
I can use both to do the same thing in my code, so is there any benefit of using one or the other? double myvariable(4.2432); cout.precision(2); cout << ...
[1 reply] : See this: http://www.cplusplus.com/reference/iomanip/setprecision/ T... (by coder777)
by Meden
Project Euler problem 20. Getting wrong answer
 
My code seems to work fine as I carefully step through it in the debugger, but I have a mistake I can't find. Does someone see it? As far as my approach goes,...
[5 replies] Last: #include <iostream> #include <vector> #include <numeric> using namesp... (by lastchance)
Error help
 
Hello! I am still fairly new to C++ and need a bit of help or guidance. Here is my 3 files of code: Record.h, Record.cpp, and main.cpp; Record.h #includ...
[6 replies] Last: My full program is now: Record.h #include <cstdlib> #include <iostre... (by Griffinflame21)
BST and Self Balancing BST
 
Space/Time complexity: BST Space : O(n) Time: Insert: Best - O(log n) and Worst - O(n) Delete: Best - O(log n) and Worst - O(n) Search: Best - O(log n) ...
[no replies]
testBed issue
 
So I am writing a sudoku project, like I was in my previous post, I was able to save the written numbers, but the rewritten code is giving me issues, it's not s...
[no replies]
Simple Program Is Skipping Statements
 
Hi all, I am trying to write a simple program that reverses the contents of a singly linked list of integers and I would like to be able to see the list before ...
[4 replies] Last: Thank you very much for your explanation. It also clears up some other... (by mlholder)
save function
 
So I am creating a Sudoku board and it displays just fine, but when I save the input to a different file and reopen it back up it gives me craziness. The board ...
[8 replies] Last: What's weird about this, this actually works, but then I do the comput... (by alextexasfan12)
std::set and std::map
 
Hi, I have gone through the description available for std:set and std::map. I am not understand what are the purpose of two associative containers in STL? ...
[5 replies] Last: Underline data structure: set/map - r... (by akash16)
July 2017 Pages: 1... 789101112
  Archived months: [jun2017] [aug2017]

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