Beginners - October 2020 (Page 5)

by CeErre
using FOR issues!
 
Hello fellow geeks! So, i need help with a bit of an assignment. i need to get the following output to print: 9 8 7 6 5 4 3 2 1 Only using the code b...
[6 replies] Last: #include <iostream> int main() { for ( int i = 9; i; i--) std::cou... (by lastchance)
int Array[]
 
I tried a lot of things but failed. int student ; The number 3, how can I ask user to input there desired number here? I wanted to run for command next. B...
[15 replies] Last: Thanks a lot, everyone. (by HelpMeBro)
assistance with Logical NOT Operator
 
I am new to c++ and I am not sure in what situation should I use the ! not operator? I know what it means and does but not sure how one would go about using it?...
[1 reply] : Let's say you have a function that returns a bool. bool foo(); No,... (by doug4)
function Prototypes First timer
 
Wondering if I have this setup correctly? Supposed to create a prototype and define it. Also not supposed to use cmath or POW function. I feel like I am close ...
[7 replies] Last: Thanks jonnin after you said that I remember using that way before and... (by briancb2004)
Connect main.cpp, functions.h and functions.cpp
 
Hello, I want my functions to be declared in functions.h, I want their bodies to be in functions.cpp and I have my main.cpp, which calls these functions. How to...
[1 reply] : $ g++ -c main.cpp $ g++ -c functions.cpp $ g++ main.o functions.o -o ... (by ne555)
Homework help
 
My program is supposed to make a mixed fraction. for example, the fraction 7/2 should be outputted as 3 1/2. The fraction is still not coming our correctly with...
[8 replies] Last: The display question raised at the start is solved thus: #include <... (by againtry)
Cannot convert '__gnu_cxx::_alloc_traits<std::allocator<std::_cxxll:basic_string<char> (1,2,3)
 
what does this error mean at line 96? // Program to read a CSV file containing company items into an array of structures // // Author: // // date: ...
[43 replies] Last: Thank you i appreciate it (by FanOfThe49ers)
python-cpp for loop
 
How to write the below python for loop //Here the obj is the list of objects for i, j in zip(obj[:-1], obj[1:]): Tank you
[3 replies] Last: Consecutive elements? In that case: #include <iostream> int main() {... (by keskiverto)
ascending&descending order
 
hey lads, I am stuck cause of my lack of attention I guess, the code below works fine for displaying ascending order of a vector using pointers. w...
[3 replies] Last: @salem c - thanks for your advice, I will keep in mind. @seeplus I a... (by MaxGreen)
by esteef
HW help beginners
 
So I am a beginner. This is my current HW question. Write a loop that reads positive integers from standard input and that terminates when it reads an intege...
[4 replies] Last: Yes andy you are correct i will do that from now. Seeplus thank you ... (by esteef)
This bad, bad printf()
 
I had heard that she's a bad girl - but I did not expect such unbridled behavior :-)) #include <stdio.h> #include <stdlib.h> int main() { int choice; ...
[4 replies] Last: May be you are right coder777. Its cpp.sh site problem. They'll fix it... (by Emil Enchev)
Invalid operands for binary expressions error
 
I am following a Ray Tracing series to create a custom ray tracer with C++. There are several custom classes that are being created but only two are relevant fo...
[5 replies] Last: This is the tutorial https://raytracing.github.io/books/RayTracingIn... (by djcampbell)
Cannot convert '__gnu_cxx::_alloc_traits<std::allocator<std::_cxxll:basic_string<char>
 
what does this error mean at line 96? // Program to read a CSV file containing company items into an array of structures // // Author: // // date: ...
[3 replies] Last: @FanOfThe49ers, This is the same bunch of problems as your previous t... (by George P)
Returning functions
 
I am trying to do an assignment where I call from my second function to answer my first. There is not much in my book on how to do this the way the assignment a...
[8 replies] Last: good catch on the int/double. "a way around this would be to create ... (by jonnin)
How does std::array know it's size?
 
I wrote this script so I could look at data structures. When I looked at a std::array<char,3> I was surprised to see that it's size was three. So how does it kn...
[7 replies] Last: address_view(std::cout, &a1, sizeof(a1)); That would give an erron... (by George P)
Floor and ceil using if then
 
how to run Floor and ceil program with if then? i have make the program but i cann't result. someone maybe help me,please this is my program: #include <st...
[3 replies] Last: thankyou salem c and seeplus,i got itand my code has been succesfull (by nathamael404)
Simple charade game
 
Hello! I was thinking of making a charades game. Just a simple one wherein when you run the code it will display a Category and then the Word that the user will...
[1 reply] : You need to store your words, together with its category. You need som... (by nuderobmonkey)
confusing with argument
 
I get the idea of how this work but I don't really understand how did it bring the information by using printDouble(num); int num {getvaluefromuser()} would go...
[3 replies] Last: I'd recommend taking a look at a tutorial about functions, for example... (by MikeyBoy)
the ( ) and no integer
 
I did this, following the tutorial, but I want to 100% understand why int getNumber() doesnt need any integer inside the ( ). #include <iostream> i...
[12 replies] Last: int print(int x , int y) // it is int because it carry x and y over. ... (by MikeyBoy)
October 2020 Pages: 1... 34567... 13
  Archived months: [sep2020] [nov2020]

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