Beginners - March 2019 (Page 16)

help
 
Hi, I need the code for the roughness formula, I can't find it anywhere. The list of numbers I have to use are in a txt file.
[11 replies] Last: [quote=lastchance]@nypran, it looks from your notation as if you are a... (by Enoizat)
stream flow inside while condition
 
Hello, I don't understand why this works: while (ss >> a) { v.push_back(a); ss >> ch; } where ss is a stringstream object, v a vector ...
[2 replies] Last: The >> is an operator. Operators are used in expressions. Expressions ... (by keskiverto)
by sturk
Issue with line class polymorphism
 
Hi, I need help in getting my code to output the required text as shown below. Problem is in my class line constructor, I'm stuck at the moment on how to achiev...
[4 replies] Last: It's ok alr. Thanks. (by sturk)
by xeuz
Shapes with structs and arrays
 
Hello ladies and gents, my name is xeuz and this is my first post. I'm trying to figure out how to connect the structs to arrays so that i can make shapes start...
[2 replies] Last: Hello xeuz, You have a good start. Using an enum class these lines: ... (by Handy Andy)
Selection Sort
 
I have this function that is supposed to organize names along with corresponding scores in descending order using selection sort. The scores will go descending ...
[1 reply] : swap( scores , scores ); (assuming that you are using std::swap fr... (by lastchance)
Send SMS with Twilio using Visual Studios
 
I'm currently trying to send a text message using this example from Twilio: https://www.twilio.com/docs/sms/tutorials/how-to-send-sms-messages-cpp I was able ...
[2 replies] Last: I am using Visual Studio 2017 version 15.9.8. Compile as is set on "De... (by Monzaku)
Hyperlinked document system
 
I started working on C++. This is my second month and i am building building a hyperlinked document system similar to web pages on the Internet. Impo...
[1 reply] : You've got much bigger fish to fry IMO. Forget about "all the files" ... (by salem c)
Exception thrown
 
I got a code like this, in order to print out the max element, position of a number, and prime elements in an array. #include <stdio.h> int findMax(int a , i...
[5 replies] Last: How about initializing max = a ; inside the function, delete the max p... (by thinhphucvang)
by cash
2-D Vectors
 
I'm supposed to design a program that declares a 2-dimensional vector and initializes it with random rows between [3,5], random columns between [1,10], and fill...
[1 reply] : Something like this, perhaps: #include <iostream> #include <random> ... (by JLBorges)
by queue
It's about input, store, and output data.
 
can someone check my program? so there's add option for this, i wanted to store multiple medical records, but when i do that it seems that it only overwrites th...
[8 replies] Last: Hello queue, is the program you made don't overwrite the old data wh... (by Handy Andy)
Reading specific lines from file
 
I am working on a homework assignment and i am stuck and was hoping that someone could point me in the right direction. This is what i have so far and this is w...
[5 replies] Last: Hello mxracer321, I understand the bigger program. I will look into t... (by Handy Andy)
alphabet and its position
 
So far I've got the code to display Enter a character: a a is the 1 in the alphabet but I was wondering how it'd be possible to output the actual word(first...
[2 replies] Last: Thank you! this helped so much :) (by huwha12)
std::bad_alloc When using less memory ?
 
Base conversion example: If the number 17 was to be converted into base 5 17/3 = 5R2 5/3= 1R2 2/3 = 0R1 The value in the new base = All the remainder...
[7 replies] Last: I think we have a classic XY problem here. Previous threads for refer... (by lastchance)
c++ Nested for loops
 
Trying to implement A Double for loops that produces this output. 3 0 1 2 3 4 0 1 2 3 4 5 0 1 2 3 4 5 Here is my code Please help. #include <iostream> i...
[1 reply] : for(int row = 1; row <= col; row++ ) Please always use code tags. ... (by lastchance)
by cc046
time complexity issue
 
https://www.codechef.com/MARCH19B/problems/JAIN/ #include<bits/stdc++.h> #define ll long long using namespace std; string finals(string s1,string s2) { ...
[18 replies] Last: @ne555 the only thing that you should cout is the answer, remove line... (by closed account STD8C542)
by mpg
common elements about two array c++ (1,2)
 
I am searching a code (i am studing at school) for find and print common elements about of two arrays. This print two arrays if thery arent equal but for the co...
[22 replies] Last: In my upper code I whish two array with rand numbers if they are in a... (by mpg)
Array Values assigning wrong Array
 
Why does my Array assign values into the empty Array? The "keylist.txt" file simply contains "2 14 74 8 36 4 11" It clearly is assigned all zeros before I sca...
[3 replies] Last: Because C++ does not check that you are writing past the end of the ar... (by dutch)
Problem debugging operator overloading example
 
I am recently new with C++ and I am trying to understand operator overloading. I am having the following problem in my .cpp file. Could someone help me out ? I ...
[3 replies] Last: Complex& Complex::operator+(const Complex& c) { this->re = this-... (by Repeater)
I'm trying to write a code that finds armstrong numbers, but it outputs a huge number.
 
if trying to write a code that has to type two variables n and m, and then output all armstrong numbers(numbers that equal their digits to the power of number o...
[5 replies] Last: Recursion practice: #include <iostream> using namespace std; unsign... (by lastchance)
do ... while (not looping) char to telephone
 
Homework summery below. Iv been working on this for days and oddly cannot get this code to work correctly, taking from things i found online, in my book, in my...
[4 replies] Last: mmmm idk, changed based on your comments and it broke even more inside... (by blackstar)
March 2019 Pages: 1... 1415161718... 25
  Archived months: [feb2019] [apr2019]

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