Beginners - January 2017 (Page 20)

by zingo
add window for progress bar
 
I'm a beginner trying to add a few small features to a project that was given to me. I added libcurl to download a file before the program launches. I wan...
[1 reply] : Your program sounds like a game (or something similar) Which means mos... (by liuyang)
Using non-integer values with cin?
 
I am brand new to C++, and trying to create a simple program to calculate GPA as is done at my high school, for the sake of practice. I can't figure out how to ...
[2 replies] Last: Thank you so much! (by imoverthese)
C++ Program to check for balanced parentheses in an expression using stack.
 
Write your question here. Hi guys, as the title states, I'm trying to create a program that takes string as an input, searches through it, and checks whether o...
[4 replies] Last: Ah , I see, thanks for pointing out my mistakes guys! :) (by schmiischmoo)
c style pointer arithmetic?
 
Hi Could somebody explain why the following 2 lines in the code below cout << 2 << "\n"; cout << 2 << "\n"; are valid? I understand all the other us...
[1 reply] : 2 is just the same as arr . arr = *(arr + 2) = *(2 + ... (by Peter87)
char_traits::assign question
 
I am looking into the <string> header and came along char_traits::assign on <http://www.cplusplus.com/reference/string/char_traits/assign/> there the reference ...
[3 replies] Last: what is static void used for with the first definition, or why is it ... (by Cubbi)
using c style pointer in c++ constructor
 
Hi I am attempting to try out composition, so a class has an object of another class as a member. In the case below, Glum has an object Fabulous. I get the fol...
[2 replies] Last: A few other problems: Line 8: You reference cout, but you have neithe... (by AbstractionAnon)
My length function with class
 
I showed my some code to you, and I have to use my_len function for length. How can I do it for my_len(?????) . What should I write as a function parameter? Sh...
[10 replies] Last: to add on something for safety precautions void my_cpy(char* dest,... (by closed account SECMoG1T)
counting number of files in a Dir , switching btwn functions
 
Hello everyone, I have a console program that I created, it works fine but I would use some help to solve two puzzles that I seem to be facing. Basically my co...
[10 replies] Last: Ooh thanks man, hadn't been around, thank you for that guide i'll be l... (by closed account SECMoG1T)
by wolfv
vector of structs compile error
 
The following code gets this compile error: vector_structs.cpp:23:17: error: ‘__gnu_cxx::__alloc_traits<std::allocator<main()::Layout> >::value_type {aka s...
[8 replies] Last: Overloading ctors, subscript and insertion operators could be another ... (by gunnerfunner)
string and space
 
Hi. I have a problem, because in my code if i put space in string, it doesn't work. Please help. string kon; void ken() { cin >> kon; if (kon...
[5 replies] Last: Hello ASCIIIsVeryHelpful, The "function ken()" works fine for me. Wit... (by Handy Andy)
Difference in machine language code
 
Was wondering if the 1st code snippet would produce more efficient executable code than the 2nd: (1) int main() { int n,i=1; cout << "...
[4 replies] Last: In response to: I would be rather surprised to encounter an optimizin... (by cire)
Need help with some c++ questions (Total beginner)
 
Hey guys I've been asked to rewrite this code into the correct form to output x,y and z. But i'm not too sure how to do that? I'm thinking it might be to do wit...
[1 reply] : You could have accessors/mutators, while keeping member variables priv... (by integralfx)
by peklo
greedy algorithm with all posible combinations of a given number
 
I need help with solving this problem. I can use numbers 20,10,5,2 or 1 and have to display all posible combinations. input: 11 output: 10,1 5,5,1 5,2,2,2 ...
[4 replies] Last: can you mybe work out something with this ? #include <iostream> usi... (by peklo)
by tofi
search for a number from one txt file in another .txt file
 
Hi I have a .txt file contains two cols . number and state e.g : number state 372 close 408 close 509 close and I have another fil...
[15 replies] Last: @kemort Thanks for helping me . The example you provided works as I ... (by tofi)
Trying to make basic if command
 
Hello people. I'm new learner of C language,and I'm trying to make simple and basic ATM software on C.However, When I try to make password activation on that...
[1 reply] : In main you initialize password to 9314. When you try to enter a strin... (by Thomas1965)
by jo123
How to use find for the inner map
 
Hello Everyone, I need a help in using "find" for the inner map. My 2D map is like this std::map<int, pair<int, double> > my2DMap; and I am using ...
[8 replies] Last: Thanks a lot Keskiverto. (by jo123)
Loops assignment
 
Can someone help me with this C++ programming. I use linux through putty to do this. Create a C++ program which outputs the first four powers of three and th...
[3 replies] Last: Hello Masbah97, In addition to http://www.cplusplus.com/forum/unices/... (by Handy Andy)
by icy8
Output exe. not showing for visual studios. I tried everything! help!
 
Hey guys im on windows 10, and also new to coding. Ive recently downloaded both 2015 and 2017 visual studio with every c++ related package installed, and whene...
[4 replies] Last: Hello icy8, kemort's answers are good, but I will try to explain it d... (by Handy Andy)
by peklo
rectangle with ziggzagg lines-need help...
 
i m having a problem with getting the right equation for my code (if i replace the 8 with n). sry for my english. #include <iostream> using namespace std;...
[7 replies] Last: thank you all, you helped me quite alot here! (by peklo)
Output Incorrectly
 
I am writing a program that creates a rectangle with the user's dimensions. But, for some reason it always displays incorrectly. Example Height: 5 Width: 5 ...
[7 replies] Last: #include <iostream> using namespace std; void makeRectangle(int, in... (by closed account 48T7M4Gy)
January 2017 Pages: 1... 1819202122... 24
  Archived months: [dec2016] [feb2017]

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