Beginners - May 2009 (Page 12)

Error message decoding
 
Hi all! When I compile my program, I've got an error message in this sequence inf = fopen("proba.txt","r"); for (i=0; i<adatszam; i++) { ...
[3 replies] Last: I think I've solved it, after an hour, thanks for helping! :-D (by Sycrupol)
cash breakdown formula
 
hi there! can somebody help me with a problem i can't seem to solve. my professor has asked me to create a C++ source file that acts as a cashier in a store...
[3 replies] Last: How about something along these lines: #include <iostream> usin... (by mcleano)
Getting last element from vector
 
link_Node *pNode,*tempsegnode;; // here link_node is a class vector<link_Node*> *pList; pNode = (*pList) ; i want to find that a pNode is last i...
[5 replies] Last: As Grey Wolf demonstrated in the sample code: vector::back() will... (by Lodger)
by wretch
compare uint to negative value
 
unsigned int uInt = 4; if ((signed int)uInt > -1) cout << "bigger -1"; else cout << "not bigger -1"; If I leave out the (signed int) recast fo...
[5 replies] Last: The choice of signed or unsigned depends on the loop requirements. ... (by Duthomhas)
Simple TextOut of a variable?
 
How would I do something like this: int guesses; TextOut(hdc, 150, 60, TEXT(guesses),2); I want to output a variable in to my screen. How would I do tha...
[9 replies] Last: but where does it appear within the window? Hell if I know. I just ga... (by helios)
Private vs protected.
 
class AA { private: int qq; string bb; protected: double pp; } public: // blah blah what is the different in using Private and Protected i...
[4 replies] Last: class AA { private: int qq; string bb; protected: double pp; ... (by littleimps)
Circular Single linked list
 
I was wondering if anybody could explain how to insert and remove from a circular linked list. I have a book that only provides a picture of nodes with the ...
[1 reply] : I've not wriiten a circular list - but I've given some thought about ... (by guestgulkan)
a pointer to a function ?
 
Hi, this code is confusing me, I think the code is illegal, but it can works. Can any body explains it for me? thx in advance! #include <iostream> using name...
[2 replies] Last: bool(*fn_pt)(int,int) This declares that fn_pt is a pointer to a f... (by guestgulkan)
Linked List Structure Using Classes
 
For my next lab test I am required to write a DNS storage and retrival program using classes and a linked list structure. The program is required to take an ip ...
[3 replies] Last: Yes, the program is run as you described. The ouput would be: 1.... (by L Plate)
by Null
int array to long
 
Hi, i have int array and i need to convert it to long int. Example array: int asd ={2,0,0,9}; long int l; how can i make l==2009? Don't forget that asd...
[2 replies] Last: Thanks Bazzy! (by Null)
Searching a file for a string, then outputting a float
 
Good day, I am working on a program for our business where the user inputs a hose assembly number and the program outputs the price. What I have managed t...
[9 replies] Last: Thanks for all the help, I got it to do what I needed I chose C++ s... (by troyjp80)
Increment Operators, puzling me
 
I have searched the topic and feel I understand ++x vs x++. My problem is that my for loop reacts exactly the same regardless of how I type it. The following m...
[6 replies] Last: Disch: I was imagining it would be a simple, obvious optimization. But... (by Hammurabi)
Simple i/o problem using txt file as input
 
I am working in my text book Problem Solving, Abstraction, and design using C++, 5th edition, Friedman. I am trying to learn about file i/o. My code will not co...
[7 replies] Last: This did the trick. This book has some issues. I typed exactly as it... (by nw4wheeler)
string
 
Hello i want to know how can i save the following sentence in just one variable. hello how are you i've tried with scanf but ot only save the first wo...
[7 replies] Last: What!? Git yer own thread. On line 8 you are comparing pointe... (by Duthomhas)
Getting data from multiple text file
 
Hi everyone, I'm having a problem with a program i need for a project. What I'm trying to do is to get some datas from multpile file. The program has to open th...
[11 replies] Last: well doesn't matter, i just needed something which would be able to pu... (by gaisselick)
by dv123
array of stuctures and pointers
 
Hello,I seem to be having some difficulty trying to create a pointer for a struct (which is an array of structs), struct prices { string item; int cost;...
[8 replies] Last: Since the members are of different types, you can't use a regular poin... (by helios)
Repetitive Zero Terms
 
Hi, I'm trying to write a simple C++ program to display the 1st 4 terms of a series as follows: Ans = 1 - x^2/2! + x^4/4! - x^5/5! The intended output...
[2 replies] Last: Also, ans is an integer, not a floating point number. (by jsmith)
Exception Handling
 
Hello, I,m working with exception handling and do not understand some of the code in my assignment. What's the purpose of " : public logic_error " after the de...
[4 replies] Last: The logic_error constructor takes a const string reference in its cons... (by closed account z05DSL3A)
by masiht
nested class question
 
Hello, Can someone please tell me how to access the member data and member functions from a class which is in the class of the class. I will be glad if anyone ...
[14 replies] Last: Masiht, This will be my last post in this thread, unless you have q... (by closed account z05DSL3A)
return a vector array from a class to main program
 
I figured it out, thanks anyways :)
[no replies]
May 2009 Pages: 1... 1011121314... 21
  Archived months: [apr2009] [jun2009]

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