Beginners - May 2018 (Page 3)

How to compile this source code?
 
Hi, I would like to compile this program: https://github.com/X9Developers/XSN/releases/tag/v1.0.9 As far as I have been told it's writen in C++ so here I am a...
[3 replies] Last: Thanks all. Yes, I am on Windows 7, I need to build there, I don't hav... (by bitcoin)
break if statements without exit loop
 
hello guys, is there a way to avoid chechking if statements when it is complited and dont exit with the loop. for example; for(int i=0;i<10;i++) { if(i==1) {...
[7 replies] Last: Hi, biwkina. Please, try to add further details. In a for-loop, the va... (by Enoizat)
Two Templates, one of which is "unable to deduct"
 
Hello, Consider the following code: #include <iostream> #include <iomanip> using namespace std; template<typename T> T Acceptable(T x) { return...
[2 replies] Last: Templates are instantiated during compilation. The compiler cannot pos... (by keskiverto)
by rubili
print out string in a string
 
HI! I have some lines of code that need your help. When I run this program, I'd like to type in a string named "Resist" at line number 18, and print out a com...
[5 replies] Last: Thanks alot! (by rubili)
what does & in this code do?
 
I tried looking this up in other websites but it only turns up as pass by reference with the & beside variables, the & has several meanings but one has made me ...
[14 replies] Last: thanks for shedding light on this! guys :) (by programmy)
Function Problem
 
Where I haves grades = score(testAv ); its telling me that i cant use score as a function. What can i do to fix this? Thank you guys for your time :D #...
[8 replies] Last: You're awesome. Thank you so much. (by iRatedRetro)
how it is useful to use pointer to pointer in c++
 
I am trying to understand why would anyone use pointer to pointer i.e **p would anyone could give me an explanation? why would anyone use it in real life?
[3 replies] Last: ** is sometimes used as a 2-d array even though vector has largely rep... (by jonnin)
Function Evaluating to nan
 
I wish to understand why this part of a larger code that I have written for some iterative process evaluates to nan and how to fix it. #include <iostream> #i...
[6 replies] Last: Dear Ganaldo, Of course, I was expecting a zero result (which I refe... (by Kloppite)
Random name generator outputting nothing
 
I made this random name generator as a practice exercise for arrays but I can't get it to output anything. I'm pretty sure the problem is in the last loop where...
[7 replies] Last: [quote=icy1]As far as I know, the implicit casting of int to unsigned ... (by tpb)
Removing element from dynamic array
 
// SimpleList.h #ifndef SIMPLELIST_H #define SIMPLELIST_H #include "EmptyListException.h" #include "FullListException.h" #include "InvalidIndexExcep...
[5 replies] Last: OK. I was just focused on the copy area where the problem was and onl... (by jonnin)
Need assistance with simplifying rock paper scissors game.
 
I am trying to make a program for rock paper scissors, and this is what I have come up with. It is complete and works, but seems far too inefficient. How can I ...
[5 replies] Last: What if you had a table of human vs ai? Let the human be rows... an... (by jonnin)
Gravitational Force Calculator - Infinity answer
 
I'm making a Gravitational Force Calculator for my Physics class and when I input numbers in scientific notation, the output for the solved problem is always in...
[13 replies] Last: Thanks to all of you for giving your input on my problem. All of you h... (by VattenVann)
multiple choice program
 
what is the initializer i need? the error is in the line on top of the "while(1)" line. I looked online and it looked like all they did was add the int in front...
[6 replies] Last: Try this: there is a function that outputs the question and receives ... (by Nickb70)
/* Function template to compare strings */
 
Is there any way for this code to print : min( adr1, adr2 ) = hello /*?*/ #include <iostream> /* Function template to compare strings */ template <class T> T ...
[2 replies] Last: Thanks I should have known that sending pointers to strings to my func... (by mycuser)
Program that inputs 2 positive integers
 
I am new to c++/computer programming. I am able to output 2 positive integers and have it say invalid when a negative integers is entered. But I also need the t...
[3 replies] Last: Hello buckeye10, PLEASE ALWAYS USE CODE TAGS (the <> formatting butto... (by Handy Andy)
Bad alloc exception from copy cons? (1,2)
 
Hi guys I can't seem to figure out why a bad alloc is being thrown,I am guessing it has something to do with the copy constructor but can't see where,when I try...
[30 replies] Last: good idea :) could you post the link to it in this thread thanks (by adam2016)
by Ma92
pointers to classes
 
what does "this" keyword means and also the line Node* headnode = new Node() mean. class Node { public: void set(int object){ this->object=object; } priva...
[4 replies] Last: If you create an object using new, and you never delete that object, i... (by Repeater)
redefinition of class
 
I having issues writing a class in multiple files. I keep getting a "Redefinition of 'Ratio'" error and im not sure how to resove it This is the Ratio.cpp ...
[3 replies] Last: Also noticed you'd probably benefit from friending an output stream, s... (by icy1)
Can I call an overloaded operator from the base class for the derived class
 
I have to create two classes: Building and House(derived from Building) In Building I have overloaded the operator < so that it returns true if the total area o...
[3 replies] Last: Example of how I envisioned it: #include <iostream> #include <iomanip... (by icy1)
by mpg
Time duration of a bubble sort process
 
Hello I am new to c++ . I am studing c++ from few months and I need at school to calculate the time duration of the only bubble sort process THe bubble sort ...
[4 replies] Last: MPG, Let me try to explain. if you run a piece of code that takes 0.0... (by jonnin)
May 2018 Pages: 12345... 19
  Archived months: [apr2018] [jun2018]

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