Beginners - October 2017 (Page 15)

Calculate median from 2 dimensional array.
 
I am having trouble figuring out why I am getting the following error. I'm also attaching the section of code I'm working on. A nudge in the right direction w...
[3 replies] Last: Here is the whole code, minus the sort function. using namespace std;... (by al bama cpp)
how to enter characters separated by space
 
i have a exercise telling me to enter five character a,e,i,u,o separated by space on one line. Can you guys show me how to do it because whenever i use cin>>a>>...
[1 reply] : Can you guys show me how to do it because whenever i use cin>>a>>U>>.... (by Enoizat)
Playing Card. If/Then Problem
 
If anyone could please help. I have to create a (if/then and a loop) program where the user inputs three numbers from 1-13 and it's supposed to identify what pl...
[1 reply] : Are you really not supposed to use any array, pointer or std::vector? ... (by Enoizat)
by jeg19
Recursive function for singly linked list
 
I wrote a function to count the number of nodes in a singly linked list that should have 5 nodes, but my function is returning 1. What did I do wrong? i...
[2 replies] Last: nevermind then lol (by Cody0023)
Opening API url in C++ (json or XML)
 
There is API data on a website offered in JSON and XML. In Python, I can call the data by using a url importer and a json converter rather simply. impor...
[8 replies] Last: No, you only need a C++ compiler and Python, IIRC. (by helios)
Editing files using file stream
 
I have an assignment where I need to open a text file. The content in the file appears as follows: XXXXXXXX Stuff I Want To Keep X XX XXXXXXXX Stuff I Want...
[7 replies] Last: Hello User55009, I will be watching. Andy (by Handy Andy)
by Bopaki
Why does my selectionSort() function not sort the list
 
Program compiles 100% correct but the list comes out NOT sorted? #include "arrayListType.h" #ifndef H_OrderedListType #define H_OrderedListType #in...
[2 replies] Last: I eventually found where my problem was. Thank you Peter87 (by Bopaki)
Course vs Tutorial vs Book for learning C++
 
Write your question here. I am starting off with C++ but am confused whether to: - start off with a static tutorial like this one (http://www.cplusplus.com/) ...
[4 replies] Last: the course is the best choice. here's a few i took: https://ocw.mit.ed... (by aki33)
Counting unique words in a text file
 
I want to count unique words in a text file and display their words and frequencies. Line 60 happens to be the problem. And I don't know how to solve this probl...
[5 replies] Last: The problems are line 13: int sequential_search ( int data , int fro... (by Chervil)
Functors in C++
 
Just a quick question : Are any classes or struct which has overloaded "operator()" function,its' object is called functors,right???? Please let me know this,...
[3 replies] Last: My question was whether or not an object of a class or a struct which... (by Enoizat)
Maps
 
I have been searching online for how to utilize maps. My objective is to get location coordinates, such as 4, 5, and pass them to check for an event at a speci...
[4 replies] Last: Hints: #include <iostream> #include <map> #include <string> using Po... (by Enoizat)
Wrong output?
 
I know the numbers are randomly generated, but my output is bad. It outputs too many zeros in wait time, or negative numbers, or huge numbers. I can't figure ou...
[3 replies] Last: Consider this: switch(...) { case 1:// Not... (by coder777)
Program to Evaluate Expression
 
I have an assignment due this Friday that I've committed to completing tonight. I've been working at it for about two hours now and I seem to be stumped. I'm me...
[5 replies] Last: Well, it was more a matter of reducing the calls to flush the buffer -... (by Chervil)
Program to find factorials
 
I have this program working BUT I want to add the ability to keep asking the user to input numbers until they input a correct number. For example, if they input...
[1 reply] : #include <iostream> #include <string> using namespace std; int main(... (by Repeater)
Find word from text file
 
Hi there! I've been struggling with finding a way to read form two text files. I have two input files "textword.txt" and "textsentence.txt". textword.txt has...
[1 reply] : Brute force: #include <iostream> #include <string> #include <fstream>... (by JLBorges)
Calling static methods from A.cpp into main.cpp
 
Hi all, i just started learning C++ and i was tasked with an assignment recently. i am currently stuck at my requirement which is creating a static method in...
[4 replies] Last: hi guys, thanks for the replied. I already solved this.. :) (by CPP NEW)
lambda value capture by reference
 
Create a local int. Write a lambda expression which captures the int, and decrement it until it reaches 0. Once it is 0, stop decrementing; return true o...
[1 reply] : > cout << " the lambda expression is " << f() << "value of a1 is " <<... (by JLBorges)
by Ihatov
How do move constructors work?
 
What are they used for? And what's the proper way to write one? In particular I don't really understand the T&& syntax at all! Can someone provide an exampl...
[2 replies] Last: Move operations are also useful in situations where it does not make s... (by JLBorges)
Making a game
 
im trying to generate a random n umber but when i press enter once it stops working and put me back in console (im using repl.it) #include <iostream> #in...
[4 replies] Last: thanks ill try it out and i didnt know that i thought it returned to ... (by Im4b4dc0der)
Output vector to scroll through it with ncurses
 
Hey there! I have a vector which holds the contents of a text file and I want to display the vector in a ncurses view, so the user can scroll through the con...
[2 replies] Last: Thank you, Ihatov! I think there's a problem because I'm reading a fil... (by littlecub)
October 2017 Pages: 1... 1314151617... 33
  Archived months: [sep2017] [nov2017]

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