Beginners (Page 2)

variable scope
I'm aware of the "avoid global variables" rule (and how you can still use them in specific cases and...
[3 replies] Last: So my first question is: on the second example, is variable a still a... (by dhayden)
std::unique() to compare two vectors?
Is it possible to have std::unique() compare two separate vectors? For example: - Vec #1 = {1, 2...
[17 replies] Last: Well you asked it to output the number of duplicates ... so it did! Th... (by lastchance)
by orcusb
Still not getting pointers
Im doing an exercise where I put integers into a vector, remove them from the vector, and then displ...
[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 ...
[3 replies] Last: 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’...
[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...
[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 t...
[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>,...
[4 replies] Last: 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 ho...
[2 replies] Last: Better instrumentation would help. #include<iostream> #include<vecto... (by salem c)
Rounding Doubles without round() Question
Well, I have spent ~3 hours trying to figure out what should be a simple solution. I'd greatly appre...
[3 replies] Last: (int) just effects a "cast", i.e. a change of type, in this case to in... (by lastchance)
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...
[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 o...
[1 reply] : Yes. (by Furry Guy)
by AL88
Why is my deep copy not working?
Why is my deep copy not working? Can anybody help me fix it ? I get the error "error: cannot convert...
[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....
[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!...
[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+...
[2 replies] Last: This is a nice problem. Here is my 10 cent take on it. outer loop is... (by jonnin)
problem with a repeater
I have a problem with my program that repeat names,it work correctly first then it glitch out when y...
[11 replies] Last: Hello ahmedddddddd, Just to let you know your link did not work for m... (by Handy Andy)
by Yersy
Function Definition
I'm new to computer science and while writing this code I keep having the same error message at line...
[4 replies] Last: BTW, another fix you should make, after fixing getUserChoice(). Do NO... (by Furry Guy)
Nested if else within a for loop
I'm having trouble making sense of my nested if else within a for loop. I'm betting it also has some...
[5 replies] Last: #include <iostream> int main() { // Array is not a pre-defined C+... (by Furry Guy)
Determine the weight of the split fruit
Hi there I currently finding a question in vjudge interesting so I start to make some code about the...
[11 replies] Last: > each of the two parts weighs even number of kilos You can't split ... (by salem c)
Pages: 1234... 16
  Archived months: [jul2019]

Cannot post in this page. To post a new message, go to the first page.