Beginners - July 2019 (Page 7)

Dynamic Programming tips plz?
 
Hello everyone, I am a beginner in c++ programming. I was learning data structures & algorithms and came across the knapsack problem, optimal merge pattern, tra...
[2 replies] Last: okay, thank you! :) (by lordcommander)
Help with Loops/If Elses
 
Hi, this is an assignment for class that I can't seem to get fully working. We just started a few weeks ago, so we can't use anything advanced. But basically I'...
[6 replies] Last: Hello jakeb10, As I already said: When dealing with a min and max, ... (by Handy Andy)
by mcclit
help with vectors
 
how to print out the qualified items in a vector if a user decides to search for it? example:amount>= 100 200.20 Monthly electric, water and gas 1200 Ren...
[5 replies] Last: Hello mcclit, You are welcome. No inconvenience as long as you learne... (by Handy Andy)
endianess in c++
 
I have an example code: #include <cstdio> int main() { char arr=0x11; printf("c=%c\n", arr); return 0; } With the example, It is will use: "...
[12 replies] Last: By the way, most development systems have fast, easy, mostly-portable ... (by dhayden)
ifstream arrays and functions
 
Hello who all reads this question. I am curious if the ifstream declare is the same method as ofstream when you declare a function/prototype? IE void print(int ...
[3 replies] Last: Sure, you COULD use that prototype as shown. However, you will massive... (by lastchance)
Code For Accessibility Features
 
I am a blind woman who uses JAWS (Job Access With Speech) screenreader software, and I'm a beginner at programming with languages other than HTML. I'm beginnin...
[19 replies] Last: Sorry, but it's been many years since I used wxWidgets, or did any oth... (by MikeyBoy)
help
 
Create class which will have three private integer variables, where third variable should be an average of the previous two. Create set_values and get_values me...
[3 replies] Last: This is a story about four people named Everybody, Somebody, Anybody a... (by salem c)
Please Explain the !strcmp function from the code.
 
Please explain !strcmp function in the code i could'nt get the idea .Please explain it . I want to implement it in my programs . void Book_Author(){ ...
[2 replies] Last: I want to implement it in my programs . You should consider <string> ... (by jonnin)
printing multiline strings horizontally
 
Is there a way to print the following sample code beside each other instead of on a new line? #include <iostream> #include <string> using namespace std;...
[14 replies] Last: Depending on your needs, you are essentially looking at a sprite map. ... (by Duthomhas)
C++ - Help with matrix!
 
Hello! So I have this code which displays a 3 by 3 matrix and outputs each element as a 0 or 1, using rand. #include<iostream> using namespace std; void p...
[2 replies] Last: Appreciate it man, thanks for clearing it up. (by jonathon378)
Find the largest of 3 numbers - using a function.
 
I have the following code which gets the largest value of 3 inputed values: #include <iostream> using namespace std; int main() { ...
[4 replies] Last: Thank you guys. (by pwnsamp)
Input without the enter ('\n')
 
Whenever your input something using cin >> thing , the user always has to press enter for the the program to evaluate anything as input, How would I input som...
[3 replies] Last: Um oops. Sry I forgot to check after so many times, thanks okay yeah I... (by highwayman)
Basic calendar
 
So, I'm attempting to create a calendar using basic C++ concepts. Honestly, I've only been doing this for about 5 weeks now, and a lot of the basics of C++ ar...
[3 replies] Last: You can use mktime to get first_day. This has the advantage of handli... (by dhayden)
Exception
 
#include <iostream> using namespace std; double division(int a, int b) { if( b == 0 ) { throw "Division by zero condition!"; } return ...
[18 replies] Last: Scott Meyers It's a shame his audiences only gets about a quarter o... (by closed account DLw0Djzh)
Making a Calendar in C++
 
This is what I have so far. Can someone help me with my if statements, to get February to print with 29 days during a leap year? And also to get the first week ...
[4 replies] Last: You shouldn't need to enter the weekday of January 1. You can find it ... (by dutch)
Using a 'while loop'
 
Hi there! I'm supposed to work in this while (score < 0 || score > 100) { ... } in the function void getTestScore(int& score) but I'm not quite sure ...
[5 replies] Last: @Bluegirl64, a tigthter implementing of your findAndReturnLowest() fun... (by nuderobmonkey)
Cannot add objects to a template vector
 
Hello Everyone, while writing a Library management application I run into a problem, that I can't find any solution to. I have a template class 'Database.hpp'...
[1 reply] : get_Readers() returns a copy/temporary object that is dismissed afte... (by coder777)
by Bopaki
How do I make pointer A to point to the list
 
I want to execute these statements: cout << list->info; cout << A->info; cout << B->link->info; cout <<list->link->link->info; I keep getting errors ...
[5 replies] Last: Your code doesn't do anything with the input: cout<<"Enter numbe... (by Repeater)
by mcclit
How to pass a file into a vector and into a private constructor
 
How to pass a file into a vector and into a private constructor, also how to display the elements of the vector if user chose to "show" #include <iostream...
[3 replies] Last: The first question is how to pass a file into a vector that also stor... (by coder777)
C4700 uninitialized local variable 'age' used
 
Currently working on a hw assignment and I thought I fixed all the errors but I guess I'm missing one. I added comments to the changes I've made so far. The ass...
[5 replies] Last: Hello hjabba89, You are welcome. Any Questions just ask. In the futu... (by Handy Andy)
July 2019 Pages: 1... 56789... 11
  Archived months: [jun2019] [aug2019]

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