Beginners - March 2017

Recursive Backtracking Maze Solver
 
Hey guys. I need to write a maze solver that using recursive backtracking to solve how to get through the maze. It will read in the maze file from command line ...
[1 reply] : If you search the forum for "maze" you'll find some similar problems t... (by dhayden)
Arrays In Class "Invalid Use of Non-Static Data Member"
 
Happy Reading! I've used this code in a previous revision where I didn't use classes. Now when I try to pass it through I'm getting: "Invalid use of non-stati...
[3 replies] Last: I was using a C string because when you would input a name like "Benj... (by jlb)
do while loop
 
Given an int variable k that has already been declared , use a do...while loop to print a single line consisting of 97 asterisks. Use no variables other t...
[3 replies] Last: note OP line 2 and line 5 have different scope (by gunnerfunner)
Bool true/false for error checking
 
Hi, I am working on a lab assignment and I am having trouble with this one section. I need to write something that will print an error message and not run the p...
[4 replies] Last: Chervil - this was a great point, I was doing exactly(!) the same and ... (by gunnerfunner)
Control may reach end of non void function
 
I am getting the error message that the control may reach end of non void function and not exactly sure what is wrong. double LinkedListStudent::searchS...
[10 replies] Last: Is return N->GPA correct? It seems ok - without seeing the rest of... (by Chervil)
C++ to Raptor flowchart
 
How do I put this C++ program into a raptor flow chart? #include <iostream> using namespace std; //function to sets each array element to the corr...
[2 replies] Last: Have you already learned what an initializer list does? Instead of wri... (by goldenchicken)
last item in inventory viewed twice
 
In the code below i am having a bit of trouble. the program should allow you to view the items in a list of items, add a new item or edit and existing item on t...
[8 replies] Last: There are two errors at line 6/96: While (dataFile.read(rei... (by Chervil)
in and out stream
 
I am having to do a caesars cipher program and when I encrypt a file it works fine but the problem is when I decrypt. Example I have a file called "plain" t...
[6 replies] Last: The following version works, but it's very basic: /* ==============... (by Enoizat)
Where is this function coming from?
 
Hello! I found this function online and I cannot trace the research paper from which is coming from. It calculates the Cumulative Normal Distribution. Any clu...
[2 replies] Last: The cumulative density function of the normal distribution (CND, or Ph... (by lastchance)
Static int inside struct is undefined !!
 
Why static int is not defined inside struct abc.. #include <iostream> using namespace std; struct abc { static int x; }; //int abc::x; int main() ...
[1 reply] : Static members have to be defined outside the class somewhere, like yo... (by helios)
Space Invaders Scorekeeper & Enemy Motion
 
I need help on two things: How do I create a scorekeeper to track when a "bullet" hits an "M"? How do I make each M move downward? #include <iostream> #inc...
[1 reply] : This code might be the problem: (Line 25) { struct Bullets b1; struc... (by goldenchicken)
by Meden
When you call a function, what do these do<>
 
I am studying cire's solution here: http://www.cplusplus.com/forum/beginner/108849/#msg592118 To understand it I have been learning about templates and type...
[1 reply] : get() is a function template and <> tells the complier the type a part... (by gunnerfunner)
Using Guards in CPP
 
Hi, guys! I have recently started to expand a small program I have written a few days ago and I need to include more header files to improve its readability...
[6 replies] Last: This is a syntax error because of the space between the two underscore... (by JLBorges)
Is there a way to evaluate "if (variable is an integer)"?
 
Title says most. I'm working on a class template, and I would like to be able to compare a template variable to a data type, rather than a value, and have a ...
[3 replies] Last: > if the stack is empty, I want to be able to return a default value ... (by JLBorges)
Is there a way to open matlab ?
 
I'm writing code which reads data from a text file and sorts it. I would like to plot the data in MATLAB so I was wondering if there is a way to open matlab lik...
[1 reply] : you can start any executable with C++commands. Try the executable n... (by jonnin)
by Arios
Function not being invoked
 
my function isnt being invoked so it just compiles and ends, any idea's? #include<iostream> #include<string> #include<ctime> using namespace std; /...
[2 replies] Last: Your function was called (try strings of different length) but your me... (by lastchance)
Returning INT Through a Class
 
Morning/Afternoon/Happy Lunch-Time I'm trying to get it so I can pass an Int into Dice::Hundred and it returns that Int back into Main with a number less tha...
[2 replies] Last: Thanking you highly ;D (by Suroh90)
Need assistance with c++ program
 
This program is supposed to use a double scripted array-A company has 4 salespeople(numbered 1-4)who each sell five different products(numbered 1-5)Once a day, ...
[7 replies] Last: Sure, I can try to help but what exactly do you need help with? It app... (by kingkush)
convert to loop
 
How do i make this so it keeps repeating unless a -1 is inputed. And when inputed it couts a statement. I have tried do while and if but it messes up on me ever...
[3 replies] Last: Jvardam I am not sure i understand, Binary number 10010000 is in deci... (by xxvms)
Please help with c++ program?
 
This program is supposed to use a double scripted array-A company has 4 salespeople(numbered 1-4)who each sell five different products(numbered 1-5)Once a day, ...
[5 replies] Last: the guy was not responding. Unbelievable, uh? (by Enoizat)
March 2017 Pages: 123... 36
  Archived months: [feb2017] [apr2017]

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