Beginners - August 2017 (Page 11)

Pop-up for input?
 
I'm just messing around with using classes and message boxes, and decided to make program only using pop-ups. How would I make a pop-up like a message box that ...
[6 replies] Last: Thank you, I just wanna make it regardless of difficulty. (by moosyman)
no operator "<<" matches these operands
 
hello, when i run this code , i am getting this error: no operator "<<" matches these operands at line 39: # include <iostream> # include <algor...
[4 replies] Last: JLBorges is right. Put #include <string> at the beggining of your code... (by Ruski)
Just started learning c++ thoughts on my first program?
 
I'm wondering if anyone can tell me if this is okay for the very first program I've coded, besides a simple "hello world" thing lol. Its a very simple calculato...
[5 replies] Last: Thank you all for the great feedback! What happens on line 35 when ... (by baller56)
Measuring blank spaces from a text file
 
I have written the following code On line number 19, Input_file>>line ; this only take first word of file, how do I proceed?? #include<iostream> #inclu...
[5 replies] Last: ohhh thanks , it worked... :) :) :) (by rajhansk)
How do i count characters in char data type?
 
Hi I know how to count characters in a string.But I was wondering how do I ouput the number of characters or a specific symbol in it?In char data type nothing r...
[11 replies] Last: LOL, I'm guilty of the same multiple times... :O) (by Duthomhas)
How can I convert a time object into another object using a conversion operator function?
 
Hello, I have 2 classes, Time and Ltime. One has objects which are integers and the other as a long int. I have been tasked with performing a class to class...
[4 replies] Last: // operator Ltime(); // conversion operator function operator Ltime()... (by JLBorges)
SAT solver problem
 
Hello everyone, I'm working on a project that requires solving SAT problems and was wondering if the c++ has a build-in algorithm and if not - where can I fi...
[2 replies] Last: Hello Andy I'm aware this issue can be found on google eventually, I ... (by nonynon)
class function to set array values produces error
 
This is my first foray into classes, so apologies if I am being REALLY dumb. I was using a whole load of arrays, but that was getting unweildly, with about a do...
[3 replies] Last: Thanks for the replies. @Chervil What am I actually trying to achieve... (by phalangium)
by kaizen
Subtree and deepest node
 
I got 2 problem in my bst coding. 1. I knw how to find the deepest node using the height of the tree and print out the node but now i need to change it become...
[2 replies] Last: template <class T> bool BST<T>::fGS2(T grandFather, BTNode<T> *cur) {... (by kaizen)
Error: Symbol 'chrono' could not be resolved & ‘chrono’ is not a namespace-name
 
This is my source code: #include <iostream> #include <chrono> //using namespace std; int main() { using namespace std::chrono; return 0; } ...
[19 replies] Last: Hi, With regard to upgrading the OS, it is a good idea to back up you... (by TheIdeasMan)
by kaizen
BST problem
 
I got a code for finding the single target ancestor in a BST. How can I change it to become finding all the ancestors wihtout any target in the BST. Basically j...
[5 replies] Last: ohh okok, i understand now thank you very much. (by kaizen)
Troubleshooting
 
Could someone help me find what went wrong in this program? This is a megamax algorithm for the game Gomoku, forming 5 in a row on a 19*19 board. It's not very ...
[1 reply] : See the warnings that are generated (Microsoft compiler with -W4 -anal... (by JLBorges)
Code treats a number as separate digits
 
Hello, Before I begin, please be aware that I started using C++ as early as 3 days ago, therefore it is required that you remain patient. I made a program...
[4 replies] Last: #include <iostream> #include <string> #include <vector> using namespa... (by lastchance)
how to populate a list from a vector
 
i want to populate a list l from a vector s , line 79 is giving an error; # include <iostream> # include <algorithm> # include <vector> # include <li...
[3 replies] Last: See overload (4) http://en.cppreference.com/w/cpp/container/list/inser... (by JLBorges)
Class pointer?
 
I'm sure it's a dumb question but I don't see the difference. class person{ public: int Age; } int main(){ person a = n...
[6 replies] Last: Hi, Unless you are writing a library or trying to simulate an STL fea... (by TheIdeasMan)
by Altis
Quotient function with multiple variables
 
Every time I compile and run and tries to test, it always give me 0.00 as the score. #include <stdio.h> #define p ;printf #define s ;scanf main() {...
[9 replies] Last: @Altis You could write lines 30-32 above [code firstline=30] cons... (by Chervil)
creating new files in new folder?
 
hello. considering the following code: std::vector<int> vec(10); for(size_t n=0; n<vec.size(); n++){ vec = 10; std::string str = "ents\\"...
[1 reply] : i found what was wrong. i should use "/" instead of "\". so the string... (by Stauricus)
Array subscript error?
 
I'm constructing a rainfall program. I have a preset list of rainfall values as follow: January 3.35 February 2.83 March ...
[7 replies] Last: I'm starting to get the hang of loops now, thank you jonnin and Andy! ... (by hihihello)
is this dynamic array
 
Hey guys is this dynamic array ? recently I remembered looking into this website's tutorial a year ago and this is written in the dynamic array section i...
[10 replies] Last: It is dynamic in two different ways: 1. It uses dynamic memory (from ... (by Duthomhas)
Trouble finding size of pointer array passed to function
 
Hi, I'd like to get the size of the pointer array passed to the function. (On line 20) arrSize=sizeof(inputArr)/sizeof(inputArr ) ; did not work. On line 20...
[7 replies] Last: [quote=oldspiderdude]I want to create an array of pointers, and find i... (by Cubbi)
August 2017 Pages: 1... 910111213... 17
  Archived months: [jul2017] [sep2017]

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