Beginners - March 2013 (Page 84)

why the -1 in the positive limit of a range of a type?
 
Hello i read in some book that the range of: int is: between (2 31 -1) and (-2 31 ) short is: between (2 15 -1) and (-2 15 ) long long is: between (2 63 -1...
[2 replies] Last: thanks cire for the explanation. (by hitmanben2)
by Kubani
Why if(!cin.get(ch)) condition does not result true when we enter ctrl+z?
 
Hello all, In this code I want whenever the use entered the "ctlr+z" whether first or after entering some characters, the program calls the error() functio...
[16 replies] Last: When we enter ^Z or ^Zcomputer , the output is the calling of erro... (by Kubani)
what is the function to generate random number
 
can u please let me know how to do a program of snakes and ladders game in c++
[no replies]
Need Help in my Binary Tree program
 
Hello Everyone , Can some one please tell me what is wrong in my program. This is basically a program to insert a new node in a binary search tree. The thi...
[no replies]
inverted triangle
 
In my C++ class we have to write a program that makes a hollow triangle that looks like this . . . . .* . . . .*.* . . .*. . .* . .*. . . . .* .*. . . . . ...
[10 replies] Last: the math I used in the other one was innerspace=rowcount*2-1 (by adam32885)
"Access Violation (Segmentation Fault)" error in Program
 
Hi, I'm not that new to programming, but I'm not a veteran either. First the specs. OS: Windows 7 Home Premium 64-bit Compiler: Dev C++ ver 4.9.9.2 Pr...
[8 replies] Last: just did before you started to post :) (by LeafyCircuits)
How to keep count in a struct array & cout is not working
 
Don't use my code :P
[2 replies] Last: I couldn't figure out why, but I forgot an 's' on the file name when s... (by monkeybutt)
friend class
 
how to use friend class in c++ prog.?
[1 reply] : You don't. (by LB)
Inheritance w/read() and write()
 
Ok I've got most of this working except this one tiny part. I've got a parent class called EmployeeClass and two child classes: Hourly and Salaried. I am wri...
[2 replies] Last: **Slapping forehead** I see my error now. I was calling them wrong. T... (by natekelsey)
Program crashes when running Delete function in doubly linked list
 
Here is my code. http://pastebin.com/fFLsbfyt The thing is, when I try to run the deletel(int item) function, my execution crashes unless the value is set to o...
[no replies]
Trinary Search
 
I am trying to convert a binary search into a trinary search. I have to keep both functions in the program, and I cannot figure out how to continue on to the tr...
[8 replies] Last: ah, well, never mind, my ternary function has a few run time bugs. It ... (by greenleaf800073)
Issue with Dynamic Memory and Array
 
Hey, My code works perfectly for this cash register program that I've made except for the dynamic memory. All sales are stored as an Array of Class Type 'Sale',...
[5 replies] Last: In line 6 of the snippet in the OP of Register::RingUpSale: GrowArra... (by cire)
josephus problem
 
here is my code,the main problem is that there is no problem in the compiler but when you input the first number, you can't put another number. I am very curio...
[no replies]
Strange intermittent and elusive math error in code
 
I have aced this C++ course until this module, and i have literally spent 3 days trying to find my error in this code. I give up, and am asking for help. With t...
[2 replies] Last: You are awesome. I can sleep now. (by Stephen Higginbotham)
Syntax data greater or less
 
Which would be less data for the final program: if{ //stuff } or: if { //stuff } Or would it be the same amount of data....
[3 replies] Last: Thanks so much! This was starting to concern me. (by Retrokin)
Function to delete an element from an array
 
I'm having trouble deleting strings from an array. The array's max size is 32. Here's my code right now: void remove_restaurant(string restaurant , string re...
[4 replies] Last: Pass current_number by reference. void remove_restaurant(string re... (by LB)
by skace
Errors during calculating answers.
 
Hello, I am trying to code a program that can solve quadratic equations, calculate the circumference or surface area, addition, subtraction, multiplication and ...
[5 replies] Last: That's correct. (by Branflakes91093)
Where do I start?
 
Ok, a little background. I am a 13 year old guy who's been using Windows computers for 4 years for general stuff and hardcore gaming. My natural interest in com...
[8 replies] Last: When I started out, my motive was to see my creation come to life on t... (by MROB)
Reading from txt file into a linked list
 
I am attempting to read data from a *.txt file into a linked list. The file is set up with 16 different types of data arranged into rows, with tabs between eac...
[1 reply] : I'm also new to linked list. Here's what I think. Line 33. head sho... (by y2krush)
need help with my homework.
 
I keep getting an error for the following program. I'm not sure what is wrong with it, and keep changing things to no avail. Any help would be appreciated! /...
[5 replies] Last: Thank you jib... I just changed it to be double profit (int,double,dou... (by closed account N8bDjE8b)
March 2013 Pages: 1... 828384858687
  Archived months: [feb2013] [apr2013]

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