Beginners - March 2020 (Page 6)

by colt
Passing reference of an object to function gives error
 
Hello, I am currently trying to pass a reference to an object to a function. First I get a reference to the vector that stores it vector <Bbox>& bbox_contai...
[2 replies] Last: error: could not convert ‘something’ to ‘bool’ Like in: vo... (by keskiverto)
by LuffyD
How to check for dot in a string
 
So , i need to check if a string has a dot, if not, the user needs to input until a string with a dot is provided. something like this, the user needs to provi...
[2 replies] Last: FYI the major operating systems all allow files without a dot. Most o... (by jonnin)
if and else/if statements not being read
 
Hi everyone -- I am currently trying to write a program that uses a function to display a greeting based on a time the user inputs in military time. So far I ha...
[4 replies] Last: Hello maddimarrone, PLEASE ALWAYS USE CODE TAGS (the <> formatting ... (by Handy Andy)
how to package a project?
 
This seems like it should be obvious but I am struggling. I have recently made a game with c++ and SDL2 in vscode mac compiling with clang. right now I h...
[4 replies] Last: I will defintitely have a go at this thanks! (by dangerawaits)
How to append an endline within a vector string
 
So in my vector string, my program is reading in the line texts from a Constitution text file, and although it is successfully reading in each line, I am unsure...
[4 replies] Last: Hello Fredo25, It would be much easier if you would provide a sample ... (by Handy Andy)
How to configure VS Code for building and compiling C++ by Control-Shift-B?
 
In C++ in VSCode I wrote a program and when I wanted to configure it I created and configured a tasks.json and c_cpp_properties.json and then command-shift-b d ...
[4 replies] Last: @Learner2, Thank you for the correction. I did not know that. Andy (by Handy Andy)
Help with if/else statements
 
#include <iostream> #include <string> #include <iomanip> #include <cstdlib> #include <ctime> #include <cmath> using namespace std; int main() { str...
[4 replies] Last: Thanks I just wanted to test out nested ifs. My next one is to to if i... (by mollywhoppinRBG)
How to get notification when removable media(usb, harddisk)is unlocked
 
for eg i have a usb which is locked with bitlocker. i am looking for some way to get notification as soon as removable device is unlocked by the user?is there ...
[1 reply] : I don't know the internals of BitLocker, but I doubt you can do this a... (by helios)
Advice on Dynamically Allocating data for a structure
 
Would like advice on dynamically allocating a structures array, so it could be modified with a cin. #include<iostream> #include<iomanip> #include<cmath>...
[14 replies] Last: Remember the static array: const int MAX_INFO = 4; // this is decided... (by keskiverto)
by knxknx
ICAO example
 
Write your question here. I am needing help using string input and using the switch statement in order to output the Phonetic version of the string entered. Al...
[3 replies] Last: Your first example was exactly what I needed help with, I just couldn'... (by knxknx)
use of auto in function parameters
 
My throw-away book says I can do this : auto f( auto n ) { return 2 * n; } but g++ gives this error : error: ISO C++ forbids use of ‘auto’ in p...
[6 replies] Last: Heh, true that. (by Duthomhas)
Tick function
 
So, i have this code and my tick function doesn't work as i wanted to, how can i change the problem to show 11:00:00 after i input 10:59:59(the ints for hour)? ...
[2 replies] Last: They're dependent conditions, not independent. if ( second < 60 ) { ... (by salem c)
Assistance Required** C++ HW Assignment
 
//My professor gave me a prompt of some code, however, he only gave me the beginning and the end and the output. The goal is to figure out the missing code that...
[1 reply] : > my professor is not a good resource for questions i bet you didn't ... (by ne555)
struggling at using erase()
 
-
[4 replies] Last: no, not like that at least respect the prototypes let's simplify mak... (by ne555)
by LuffyD
!!!!Core Dumped error,help!!!!!!
 
Im writing a program that takes different txt files with different data type each, text1.txt is int, text2.txt is double, etc, using templates so i can use the ...
[5 replies] Last: Fix your array bounds, man! They're all wrong. In readDataFile you're... (by dutch)
Uhhh.... Clean... Up.. Code..?
 
I've been making this little thing(I guess you could technically call it a framework,but it's kinda too shitty for that.) that is supposed to set up a TCP S...
[12 replies] Last: I’m not entirely sure I do do that :/ I’m much to attached to maki... (by highwayman)
Creating a dynamic array for a structure
 
I would appreciate some advice in creating a dynamic array for my structure so I can manually choose how many students I want to input data for. Here is what I ...
[2 replies] Last: Will check it out thx (by Depressed)
by LuffyD
template error
 
I need to read from different txt files, that have data of different type, one txt file has int data, other, double data, etc. using templates. For the int dat...
[1 reply] : So, is statsType a template class? Why are you so secretive about yo... (by Enoizat)
by Dee5
Time limit
 
Lately I wanted some help about this vending machine code though I decided to make some changes to it. The code does the following First input is how many cus...
[6 replies] Last: Look at the loop from lines 70-83. If Change < 0 then the look subtrac... (by dhayden)
by annw3y
Sort function error c++
 
I have a function sort Sort(vector<int>A, vector<int>B, int n) { ..... and it is works fine. In main program i have int main(int argc, const cha...
[3 replies] Last: None of my comments were about vectors, or about solving coding proble... (by MikeyBoy)
March 2020 Pages: 1... 45678... 14
  Archived months: [feb2020] [apr2020]

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