Beginners - December 2017 (Page 3)

I don't get what is wrong with my program.
 
So the site of our university ,even though the results in my program are right , for some weird reason it does not approve of my program. If anyone knows the re...
[1 reply] : So the site of our university ,even though the results in my program ... (by cire)
Help with passing pointers through objects
 
Hello, and thanks in advance. I've been trying to figure pointers and referencing out for quite some time now but I just cant seem to get it. Im trying to ...
[2 replies] Last: Thanks for putting in the time dude, need to learn more about classes ... (by MoreUmph)
-nan(ind) error when C++ code put through visual studio 2017 debugger (on Windows 8)
 
Hello, I am writing some code in C++ on visual studio 2017 (Windows 8). I put it through the visual studio debugger and my method variable double muaSKbaseline ...
[4 replies] Last: Hi, The IR_wavel variable is a wavelength floating point value betwe... (by TheIdeasMan)
Inputting non-int into int variable
 
Hi, I'm new to both c++ and programming. Can someone explain why my program works for all integers, but not when I input a letter? What is actually happening wh...
[4 replies] Last: Thanks again. I will try this out. (by Wine Wave)
FILE_NAME_INFO was not declared in this scope
 
hi guys I'm just bored so I decided to mess around a little testing functions and classes from different headers anyway I ran into an error when I tried crea...
[5 replies] Last: Apparently you might just need to override the macro definition yourse... (by Ganado)
Noob, trying to learn C++
 
Hi Folks, I am hoping for a little bit of direction. The program below is just a test program to create arrays based on input of two numbers. The numbers are o...
[3 replies] Last: High complexity as this might result with a lot of errors among the co... (by benhart)
C programming
 
Hello everyone. I am coding a program which is about Runge Kutta 4th order numerical method for solving coupled differential equations. The problem is I don't g...
[4 replies] Last: change all the floats to doubles or you will probably have numerical p... (by jonnin)
by Handge
Thread 1: EXC_ARITHMETIC (code=EXC_I386_DIV, subcode=0x0)
 
I'm getting the following error: Thread 1: EXC_ARITHMETIC (code=EXC_I386_DIV, subcode=0x0). The console is printing lldb, How would I go about fixing this? i...
[1 reply] : Whoops! Easy fix: change int rnd_num(int min, int max) { int rnd_nu... (by Handge)
what's wrong with my program?
 
Hi and Merry Christmas! Here's the problem I wanted to make a program to output how many times there is a repeating string and at which positions of a list(i...
[7 replies] Last: That was more than I asked...still thank you! (by stonedviper)
help with std::none_of
 
hello everybody i'm trying to check if any object in a vector contains a specified integer, like this: #include <algorithm> class Foo{ public: i...
[2 replies] Last: thank you, it works :) #include <algorithm> class Foo{ public: ... (by Stauricus)
by Handge
No matching constructor for initialization
 
I get the following error: No matching constructor for initialization 'vector<Ability>'. How could I go about fixing this. // Warzone v2 // (c) 2017, all...
[1 reply] : PlayerClass Champion { "Champion", // std::string ... (by JLBorges)
by Bopaki
I cannot make out why am I getting this error: undefined reference to DayOfYear::DayOfYear()
 
My program compiles OK! but when I run it I get this error: undefined reference to DayOfYear::check_date() undefined reference to DayOfYear::DayOfYear() ...
[4 replies] Last: @Bopaki Just a thought to help you out a bit: Do you use an IDE? If ... (by TheIdeasMan)
by Handge
Undeclared Identifier
 
I get the following error: Use of undeclared identifier 'i' In the class PlayerClass. How would I go about fixing this? #include <iostream> #include <string>...
[2 replies] Last: Line 40: This is the only line that is within scope of the for loop a... (by AbstractionAnon)
How to check if an element in a dynamic array of pointers is nullptr
 
Hi, I'm having a bit of difficulty understanding how to check if an element in a dynamic array of pointers is nullptr, mainly i'm not sure how to evaluate the ...
[no replies]
by darje
Linked List ..
 
No idea whats wrong with this code can someone point on my mistake please #include<iostream> using namespace std; #include <list> class queue { private: li...
[1 reply] : Lines 7-14, 18-64: You're defining your member functions twice. Dele... (by AbstractionAnon)
Difference between exponents for indices in C++
 
Could someone simply tell me the difference between e, exp and pow. In my program I like to use the indices 2.5x10^-3 for example so which one from above sh...
[3 replies] Last: Thanks you for the help guys. Really helpful (by MBANS7A1)
by wsme
Unfamiliar name lookup error
 
While attempting to create a function that would sort a defined number of random values, I had an error I was unfamiliar with (line notated by comment). Erro...
[7 replies] Last: Oh, nifty indeed. I'll be sure to incorporate std::vector into the pro... (by wsme)
by al8888
loop fall through issue
 
for my tutorial I have got to write a program that shows the difference between 2 ages and acts differently if one of the ages is over 100. i managed to get a p...
[1 reply] : why does it fall through the loop You have no loop. Line 24: You h... (by AbstractionAnon)
square and triangular numbers problem
 
I am trying to write a program to determine whether the input integer N is a square number and/or a triangular number. #include <iostream> #include <cm...
[4 replies] Last: Oh, I see, this problem has frustrated me a lot... Thanks a trillion! (by kr36k20050105)
use a '&' to create a pointer to member
 
//list of variables char fileTag_; char typeIndicator; char perishableSku[max_sku_length+1]; char *arrayHolder; char productUnit[max_unit_length+1]...
[4 replies] Last: @Ganado No, there are both. See line 12 and 18. (by coder777)
December 2017 Pages: 12345... 23
  Archived months: [nov2017] [jan2018]

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