Beginners - September 2019 (Page 7)

Creating a Min and Max, question
 
Hi, my program is supposed to get a number of students with entered gpa's and then after that find the sum, min and max. I was able to find out how to do the su...
[4 replies] Last: Float, I just figured everything out, thank you everyone (by Jason112)
Why does 3%100 work.
 
Hello,i do not need help with any code but i came across a problem which contained something along the lines of 3%100 the result of that being 3.I do not know w...
[1 reply] : a % b is simply the remainder of the integer division a / b. The remai... (by helios)
by neguse
Why does new int[x] disappear after leaving func scope?
 
I want to check if an int pointer parameter is nullptr and if so, I want to create an int array, fill it with data and the finish the function. It works up unt...
[14 replies] Last: Thank you everyone for all your help. It has been a great help, I have... (by neguse)
short sample only
 
hello everyone .. give me example of java using switch please... and Explain why ... Netbeans .. how to use switch ? for my assignment.. short sample...
[4 replies] Last: Sorry .. i think C++ and Java They are same.. but they are not they sa... (by Lastprince00)
by Hay9
Instance object of a class
 
Hey all, I am on a early beginner level. Last week I did my first exercise to create a password validator which worked well. But the code was completely in the...
[2 replies] Last: thanks (by Hay9)
hello everyone in community
 
Nice to meet everybody
[1 reply] : Hello. You should put stuff like this in the Lounge. You can move... (by Duthomhas)
variable scope
 
I'm aware of the "avoid global variables" rule (and how you can still use them in specific cases and when you know exactly what you're doing), but I also know t...
[3 replies] Last: So my first question is: on the second example, is variable a still a... (by dhayden)
by orcusb
Still not getting pointers
 
Im doing an exercise where I put integers into a vector, remove them from the vector, and then display on user input. The first function with the template was ...
[5 replies] Last: Some people insist having vectors store pointers, without realizing th... (by jonnin)
Error: cannot convert 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'char*'
 
Hi. It's my first post and I'm having a problem in C++ right now. So I'm making a small thing that gets the program's file directory and then returns it i...
[3 replies] Last: https://linux.die.net/man/3/dirname char* ExePath(){ static char b... (by ne555)
Adding right diagonals of 2 matrices
 
Write a program to create 2 dynamically created, 2D Arrays (with equal rows and columns) of user’s desired size, pass these 2 array to functions using point...
[1 reply] : > and return that array to main functions using pointer. Well you don'... (by salem c)
Blackjack game
 
I am wanting to provide the player of my game with an option to play the game again. This is what I currently have: #include <iostream> #include <cstdlib...
[4 replies] Last: player_card2 == 10|11|12|13; error: suggest parentheses around co... (by Thomas Huxhorn)
How to search a 2d array? 4 by 4 matrix
 
I am trying to write code that will search a 4 by 4 matrix called matrix . Users will be able to type their own values in. At the end it questions the user wh...
[6 replies] Last: #include <iostream> #include <core/util/ArrayND.hpp> int main() { ... (by Thomas Huxhorn)
specifying faces which have a common edge
 
I have an output file, like beneath: {6,<1,-1,-1>,<1,-1,0.5>,<1,-0.75,1>,<1,0.75,1>,<1,1,0.5>,<1,1,-1>} {6,<1,-1,-1>,<-1,-1,-1>,<-1,-1,0.5>,<-0.75,-1...
[4 replies] Last: http://www.cplusplus.com/reference/string/string/find/ and it's variat... (by salem c)
Creating a vector that holds objects
 
I am trying to create a program that can hold as many objects as the user wants. The objects will hold how many times it member method, 'data' has been called, ...
[2 replies] Last: Better instrumentation would help. #include<iostream> #include<vecto... (by salem c)
Question on input stream
 
Hello, I have a study guide for my first c++ test. I have a true-false question I can't seem to find an exact answer for. T F d) The state of an input stream...
[1 reply] : T F d) The state of an input stream can be tested as a true or false ... (by coder777)
Sort a vector of strings
 
Hi I am hoping someone might be able to help with with a quick question. I am working on a problem on paper as I am not near a computer, so I can not test what ...
[1 reply] : Yes. (by George P)
by AL88
Why is my deep copy not working?
 
...
[2 replies] Last: Thanks. (by AL88)
Need help in Merging two linked lists alternatively
 
Create a linked list and add a function to merge 2 singly Linked Lists according to following rules. Insert nodes of 2nd linked list into 1st linked list at al...
[3 replies] Last: Use parameters as Salem C suggested in your other post. Line 90: x ... (by dhayden)
Adding polynomial equation using linked lists
 
I am trying to add 2 polynomial equation using linked list .But the program is breaking.PLease help! #include <iostream> using namespace std; struct Pol...
[2 replies] Last: A linked list is a bad way to store a polynomial: - adding to the tail... (by dhayden)
finding the time complexity
 
Find the worst-case asymptotic time complexity (as a function of n) for(int i =0 ; i < =n ; i++) { for(int j =1; j<= i * i; j++) { if (j % i == 0) {...
[2 replies] Last: This is a nice problem. Here is my 10 cent take on it. outer loop is... (by jonnin)
September 2019 Pages: 1... 56789... 13
  Archived months: [aug2019] [oct2019]

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