Beginners - February 2018 (Page 15)

using print or using print
 
I use gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904 #define print std::cout // works for me however ... using print = std::cout; results in : adefs.h...
[3 replies] Last: I just remembered from very recent reading that the word "using" is a... (by mycuser)
by soul0h
Create a right-angled triangle with "Do while" Loop
 
Hello guys ! Im trying to solve this problem with do while loop which is kinda new for me. I solved it with for loop but not finding a solution for do while l...
[4 replies] Last: Thank you very much ! I solved it like this :) #include <iostream> ... (by soul0h)
Multi-dimensional array ?
 
Good afternoon, I am currently working on a small program as request by the teacher, having finished the task a week in advanced I was wondering how I could...
[2 replies] Last: Alright, Thank you. -Chris (by WolfG4n)
Search String Array Question
 
I am trying to display the student information for a search but it's not working for the names. The string nameArray has the first and last name as a single e...
[2 replies] Last: Hello priscilla96, Along with what Repeater said there is so much in ... (by Handy Andy)
.....
 
....
[2 replies] Last: Your number comes in as an integer. It has 4 digits, so you can put th... (by lastchance)
by geo28t
How to count punctuation marks in an array
 
I have seen many ways to REMOVE punctuation marks in an array, but how would one go about it when implementing it in a function? This is what I have so far ...
[4 replies] Last: #include <iostream> #include <cctype> #include <string> #include <vec... (by lastchance)
Defining variables with a return function?
 
(I am a noob, don't judge me) I was on cplusplus.com/doc/tutorial and saw this code: class MyClass { int x; public: MyClass(int val) : x(val) {} ...
[3 replies] Last: foo.get returns a reference to X, then assigns the reference (which IS... (by jonnin)
How can I see, what's inside libraries?
 
How can I see, what's inside libraries? I want to know how do work cin, cout functions, the different keywords like new, struct and etc., which comes with th...
[1 reply] : libc++ (a modern C++11 implementation of the C++ standard library) Co... (by JLBorges)
Code errors
 
Compilation failed due to following error(s). main.cpp: In function 'int main()': main.cpp:49:20: error: invalid conversion from 'int*' to 'int' [-fpermissive]...
[7 replies] Last: @Mikey If it shadows the array at line 15, this means that this array... (by MikeyBoy)
C++ program errors, where?
 
#include <stdio.h> int main() { int radius, diameter; //variable declaration printf("Enter radius: "); //prompt scanf_s("%d", &radius); //store u...
[3 replies] Last: I mean you want to print an int but the format string does not contain... (by Peter87)
Making one solution with two projects issue
 
I am trying to create a solution with two projects. I made them individually and then created a solution with the two projects and pasted the code in. When I ru...
[1 reply] : You didn't show the "merged" code that you have issues with. Your cod... (by keskiverto)
Reading from file including newline charactors
 
Currently working on a program that will read a block of test from a .txt file and add three to each character if encrypt is chosen and -3 if decrypt is chosen(...
[1 reply] : The problem with just adding 3 is that you may generate none printable... (by coder777)
by Vinz24
add, average and reverse in 1 function but no cout in the body of the function
 
i want all the task(add, find the average and reverse the digit of the inputed number) will be in 1 function and the body of the function have no cout or cin. H...
[1 reply] : Please, do not doublepost. The other thread: http://www.cplusplus.com... (by keskiverto)
PuigXML C++ Parsing
 
Hey all, I am new to the forums! Anyways, I had a few questions regarding how to properly parse XML using PuigXML on C++. I am developing a game, and I have som...
[1 reply] : If you want simple xml consider boost ptree: http://www.boost.org/doc... (by coder777)
file updation
 
What's wrong with this file updation cout<<"Update your file"<<endl; string sh; cout<<"Enter character to search";cin>>sh; cout<<endl; fstream r2; ...
[4 replies] Last: oh ok i got it now (by closed account 1vf9z8AR)
Storing A Range of Numbers in An Array
 
A while ago, I read that there was a way to store many values in an array without using a loop, but I cannot remember the syntax. It was something like this. ...
[1 reply] : Well, there's std::iota , but this isn't a language feature. There a... (by mbozzi)
Maze Gen Issue
 
So when I execute my code, it seems to get stuck in a loop and then stop. However I don't understand why because I inserted many points for the loop to either ...
[7 replies] Last: @ne555 Very sorry, if you see cCell I most likely meant 1. This is th... (by Hephaestus1233)
Reading data from a file separated by spaces
 
Hello! I am a newbie learning C++ I'm currently writing a program that will read data from a file "scores.txt" and store those scores in an array, maybe a vect...
[3 replies] Last: Thank you very much it worked perfectly. :) (by ToeMater)
i/o txt files:
 
Hello, New to this site and less than 3 months of c++ experience (just something I piddle with as a hobby). Below is the code I am struggling with. As of ...
[2 replies] Last: Awesome coder777! That is much smarter than what I was doing, thanks f... (by hawkeye)
by Vinz24
asking for help for my code
 
i make a source code on converting numbers to words. it convert but all. when i try to input: 1000000, 100000, 10000, 1000, 100, i got an error. how to solve th...
[7 replies] Last: Hello Vinz24, I solved the problem by putting this: if (num < 0) { ... (by Handy Andy)
February 2018 Pages: 1... 1314151617... 28
  Archived months: [jan2018] [mar2018]

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