Beginners - May 2013 (Page 55)

Checking whether a sudoku is valid (still unsolved round 2)!
 
Hello everyone, I am working on a programme that check whether the rows, columns and subsquares of the sudoku are valid, where the numbering of the subsquares i...
[6 replies] Last: Found the problem with my code! Where I claimed that (i / 3) * 3 is ... (by closed account DEUX92yv)
Switch in a loop
 
Hi. I have the following problem: if i use the "switch" in a loop like "do-while" i cannot see any output until i have exited the loop. int main(){ ...
[5 replies] Last: I got it. I really appreciate your help. Again, thank you very much. (by ocpodariu)
Destructor Question
 
So, I'm writing a linked list class, and I have to make a destructor for it...except we never went over how to do it in class and I have no idea if I'm doing it...
[3 replies] Last: delete first calls destructor, then frees memory. Two in one! And also... (by MiiNiPaa)
by ecv11
Need help with descending order scores.
 
Instructions: Assume that you are reading from a data file. Each line contains a student’s last name and a test score. Write a program to print out the name...
[5 replies] Last: does this look good. its not doing the output correct. I get blank out... (by ecv11)
Deep Copy Constructor in a Linked List class
 
I am struggling to write a copy constructor for my linked list class. I keep getting the following error: LinkedList.cpp: In copy constructor âLinkedList:...
[1 reply] : "Discards qualifier" usually means you called a non-read only member f... (by Daleth)
by klay2
need help with game bug
 
its really weird if you look in the code it should display a | in the corner of the screen but it doesn't and if you move left twice (hit "a" then enter then r...
[no replies]
by Tstan
How to not display decimal points
 
While trying to make a basic code to convert and display temperature, I need the program to show no decimal places so I use cout.precision(0) when I do that it ...
[7 replies] Last: @jidder http://www.cplusplus.com/reference/ios/ios_base/fmtflags/ http... (by Chervil)
nonstatic member reference?
 
Im trying to access public data members from a base class. But i get an Error: a nonstatic member reference must be relative to a specific object. this is ...
[17 replies] Last: Also i dont understand why SlotMachine::m_creditpool and SlotMachin... (by spiritedDedication)
SYS_fork
 
I am having some trouble with the browser-based compiler, codepad and every time I compile a long program, I always end up with an error and a message appears, ...
[1 reply] : It is complaining about line 42 system("pause"); //This is only ... (by Chervil)
Arrays with If/then statements and fouts
 
Self Resolved problem.
[5 replies] Last: You didn't answer my question: "What do you think should happens when ... (by MiiNiPaa)
similarity of two strings
 
please correct this code to check the similarity of two strings. #include<iostream.h> #include <conio.h> #include <stdio.h> using namespace std; int...
[2 replies] Last: Well if I was checking the similarity, I would do it like this: #inc... (by pata)
Sudoku problem: Read integers from file without spaces
 
So i have a file which is 9x9 input data: 036518090 000302000 050967140 000074086 080009002 701000059 640000801 500700020 270490000 (No spaces!!!)...
[2 replies] Last: I am following the c++ primer, I haven't got to reading from file yet,... (by pata)
command line call to joyGetPosEx function
 
How would this code look like in C++? It's currently written in autohotkey, but I would like write it in C++ since C++ is much faster to execute a simple progra...
[1 reply] : How would this code look like in C++? It wouldn't. C++ doesn't enc... (by cire)
static member variable
 
I was just trying to do a simple test using a static member, but my code won't compile and I don't know what's wrong. I tried accessing the variable through and...
[3 replies] Last: Just to inform you, what that line means: At this point, construct el... (by S G H)
by tpinon
binary file beginner
 
Hi guys, I'm trying to work with a binary file (create, write, read, etc). I can't get past an error on Line 29. " variable or field 'ShowContents' declared voi...
[2 replies] Last: ah that worked. thanks Chervil! (by tpinon)
Basic Linked List Question
 
Let's say you have a delete function. Should you delete the node itself, or just the information in the node? To me, it would make more sense to delete th...
[4 replies] Last: When deleting a node from a doubly linked list, you have to update bot... (by AbstractionAnon)
if statment help!
 
At the Mob detail part, when I press 1, it goes to the 0 part first. Please tell me how to make it go to 1 when I press 1. Thank you. #include <iostream...
[6 replies] Last: However, the main advantage of the char type for user input is that it... (by Chervil)
Average
 
Why the average is not working in here? #include <iostream> #include <cmath> using namespace std; int main() { const int age=6; ...
[5 replies] Last: Thanks all of u :) (by sabbirshawon)
Giving values to class members
 
I need to set values for variables which are struct members(variable1,variable2) in the code below. values should be different and they are just set once for ea...
[4 replies] Last: The following compiles cleanly: struct mystruct { mystruct(i... (by AbstractionAnon)
Function not working properly
 
Hello I am writing a program which prints out information from a file depending on what input the user gives. But I have a problem with one function. First of a...
[10 replies] Last: Wow, I fully understand it now haha. Update was the keyword. Thank you... (by skilzzz)
May 2013 Pages: 1... 5354555657... 66
  Archived months: [apr2013] [jun2013]

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