Beginners - September 2011 (Page 32)

uhm..
 
Hi everyone.I'm new here,and new to C++ coding.I have an assignment that can add, edit, delete, search, and display records.I've managed to add, and display usi...
[10 replies] Last: @hanst99 Oh.. Sorry.. My bad.. @coder777 I managed to do it after yo... (by sleet65)
by efigen
how to use boolean values in classes?
 
I have a problem in a c++ program when you are using boolean values to return true or false, how does this work in classes? #include<iostream> #include<s...
[2 replies] Last: Thank you!!!! (by efigen)
by tonnot
Write binary data, const definition and reinterpret_cast
 
I have a doubt with this. I have the typical function to write data to a binary file. ( reinterpret_cast< char*> (&value); ) A function can be written s...
[2 replies] Last: mmm. You're right. I have seen the << operator ...... Thanks. (by tonnot)
simple code problem
 
// This program is designed to print (to the screen) your first name on one line followed by two blank lines. // Then print your last name on the next line, p...
[11 replies] Last: Thanks a ton everyone, this makes MUCH more sense now. (by needtopass)
Unable to restore previously selected frame?
 
Hi everyone. I've been trying to learn C++ recently from a couple of books, and just started trying to make my own program. It's just a simple Blackjack game th...
[3 replies] Last: That's fixed the problem, thanks a lot! (by MetzoPaino)
Passing vector by reference
 
#include <iostream> #include <algorithm> #include <string> #include <vector> const int number_of_cards = 52; class DeckOfCards { public: void shuff...
[11 replies] Last: #include <iostream> #include <string> #include <algorithm> #include <... (by Da0omph)
by aasaa
Q_constructor_how many times is called
 
hey, after 8 hours I find no solution !! I wrote two classes: 1. Book 2. InternetBookStore // InternetBookStore.h #include<vector> #include "Book.h...
[4 replies] Last: thanks, the answer was the constructor called once and the copy constr... (by aasaa)
Smallest double from array
 
Hi let me re-state. Why does the first function work and not the second? When I try to find the smallest area it returns either 0 (i initialised to 0) or 1999.9...
[6 replies] Last: Hi thanks for your help. I really appreciate it. I've tried it and unf... (by Maya1907)
by hydroJ
Newbie, please help me condense this function, or to write it in a better way
 
I am writing a program for a c++ class that will take in an integer value. display the most significant digit, least significant digit, smallest digit, largest ...
[3 replies] Last: It's fine as long as you understand what it does. (by hamsterman)
how printf is working?
 
hi plz see the below program #include<stdio.h> int main() { int i=5; printf("%d",i+++i);//o/p is 11 but i expected it will print...
[5 replies] Last: I don't know how to make this even clearer than I or helios put it. If... (by hanst99)
Saving tokens into variables
 
Hello all, I am trying to tokenize some string sentences. I decided to tokenize one string sentence at a time and save each token to a variable. I tried ...
[2 replies] Last: strcpy(id, tokenPtr); // <--- This line of code did not work What is ... (by coder777)
Help on searching in a sequential access file
 
I'm just learning programming and I created a program to hold a CD collection. What I'm curious about is searching the file. I have a function to enter the arti...
[2 replies] Last: Hi. I don't know if i'm allowed to do this. But I tried out this code.... (by sleet65)
IDE or no IDE?
 
Hello, I have been programming on a MacBook for about a year now and I jut enrolled in a c++ based data structures class. The instructor seems to strongly e...
[5 replies] Last: I personally would strongly recommend you to use Eclipse or Code::Bloc... (by hanst99)
Making an int the largest
 
I'm testing to see if the sides make up a right triangle (a^2 + b^2 = c^2), but how do I make it so that, no matter the order put in, "c" will always be the lar...
[4 replies] Last: [quote=Wikipedia] Pseudocode is a compact and informal high-level des... (by closed account 1vRz3TCk)
Arrays
 
Hello, Like many others I have recently started learning C++. I have written the following program and have a problem with displaying my areasArray. No matter w...
[4 replies] Last: Hey, just sorted it after a good sleep. Silly mistake. thanks anyway :... (by Maya1907)
by cBegin
o/p tracing
 
#include<math.h> #include<conio.h> #include<stdio.h> void main() { clrscr(); float x=2; printf("%d",x); /* used %d instead of %f */ getch(); } why i...
[1 reply] : Either change your specifier or the data type of x. This code runs fi... (by Da0omph)
hi. can you guys help me ?
 
i am supposed to represent matrices to solve simutaneous equations, add them, find inverse etc. i am trying to help myself , but i am stuck.all i have managed ...
[2 replies] Last: Code to add 2 matrices of 3 x 3 order(for 2 x 2matrix, change the valu... (by SameerThigale)
Reverse string
 
int _tmain(int argc, _TCHAR* argv ) { string input; cout<<"write something"<<endl; getline(cin,input); string test; int len = input.length(); w...
[3 replies] Last: Set test to its current value in addition to the new character: test ... (by Galik)
Header File Problems
 
I have the following code for a header file . . . class player { private: std::string file; std::string line; int positions; int positionf; ...
[1 reply] : Are you including string? (by LBEaston)
Trying to validate input to an int, and more
 
So, I have a couple points during the program I'm currently writing where the user provides input for an int variable. I'm trying my hardest to prevent the epic...
[1 reply] : cout << "\nNow, please enter the amount of gold pieces you have - "; ... (by closed account DSLq5Di1)
September 2011 Pages: 1... 3031323334... 48
  Archived months: [aug2011] [oct2011]

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