Beginners - May 2010 (Page 32)

Using a property from one class in another class' member?
 
This is my first post here, but I've been browsing the forums for the past year I've been in college. You guys are great help when I run into snags! :) Also, if...
[2 replies] Last: Thank you so much! I had forgotten all about them! I read about them a... (by dragonbane)
count in IF() not incrementing.
 
Hi everyone i have a IF() with two counters but it is not incrementing... ignore the couts they are there to troubleshoot the loop. The characters im feeding th...
[2 replies] Last: Thats awesome thanks Albatross (by joeyjojo)
Nested Loop issue
 
Hi. I appreciate your time and help. I am to write a program that takes numbers from a file and adds up the even and odd integers. I can get the first while ...
[2 replies] Last: Albatross: You were right. Thank you very much for your help. Sim... (by KarlCat)
Program terminating issue
 
I seem to be having trouble with my program terminating when it should. I have a summation loop and I want it to kick out of that and end the entire program sh...
[4 replies] Last: Yeah, its bad style and can lead to memory leaks with things still nee... (by closed account S6k9GNh0)
by aneves
float array to bitmap
 
Can Anyone help to save a float array into a bitmap file? I'm using a std::vector <float> for storing the data and I don't need colors. Thanks for your h...
[2 replies] Last: thank you a milion. i'll try it frist thing tomorrow. (by aneves)
Double to Int conversion issue
 
Hey, just wondering if someone could help me remedy the conversion issue I'm having. Here is my code. //Steve Osborne, Using the Taylor Series #includ...
[4 replies] Last: Ya, I brought that up to him at one point and was told "Well I'm using... (by BaronInara)
by LEESI
Pointers with user input
 
Currently started to look at pointers,ive read through a fair few books etc on pointers,none seem to cover an actuall user input for example if a user types in ...
[11 replies] Last: As for always returning the same address, that would be because you're... (by Albatross)
by tysonc
Array of Structures
 
How would I store this information in an array of structures? I need to put all of this in a loop because the amount of data in the input file can vary but I c...
[11 replies] Last: Guys, in case you haven't noticed I marked this topic as solved... m4s... (by tysonc)
Autochanging Variable In A Do-While
 
Hi everone! I am totally new to C++. Please see if you can provide a sample code as to how to declaring auto changing variable to be declared in a do while loo...
[1 reply] : So you want to declare new variables in a do-while loop per iteration ... (by Albatross)
OPTION TO RE RUN A PROGRAM
 
Hi, sorry if a similar post has been posted before but I could not find one. I'm messing around with C++ and I'm trying to make a statement which lets the us...
[2 replies] Last: Ooh so it was a logic error! I thought my coding was somehow wrong. Th... (by hassan424)
by codder
c++ how to use erase
 
hi all, i'm new here int wh=0; wh=(int)str.find(' '); if(wh!=string::npos) if(str.size()) str.erase(str.find(' ')); in fact i want remove a space i...
[1 reply] : One of the std::string::erase() overloads takes two integers (a,b), b ... (by helios)
fstream ignores reading numbers 9-13 from file
 
I have created a small test to try so you can see what the problem is. Why is it when using ints 9-13, also 32 (probably some others too) that fstream writes th...
[2 replies] Last: The problem is that what you send/receive is characters. When you use ... (by m4ster r0shi)
read file into an array (1,2)
 
im trying to read a file with 3 columns and each column has a 100 numbers with decimal places.
[22 replies] Last: Please start your own topic. (Grayscale is R == B == G. The OP of t... (by Duthomhas)
Illegal use of floating point???
 
I have to code a program to return quarters, dimes, nickels, and pennies. I have everything working except for the function "change". It returns as an illegal...
[2 replies] Last: I see. Thank you. I just fixed it. Have a great day! (by mbrinkley)
by SoloXX
Problems reversing numbers in outfile
 
Hey all, First, I am in a C++ course and in my 7th week. I have a project that is due real soon but I am absolutely stuck on one part of an fstream console p...
[2 replies] Last: Thanks jmsith. Got it working now! (by SoloXX)
I'm learning C++ and I have a question about the tutorial on pointers
 
// more pointers #include <iostream> using namespace std; int main () { int firstvalue = 5, secondvalue = 15; int * p1, * p2; p1 = &firstvalue;...
[3 replies] Last: Okay, that solves my question! Thank you very much for your help :D (by Aruisa3725)
Pointer Trouble
 
I am trying to make a substring from a string using a function that returns a pointer. When I try to assign the value pointed by one pointer to another pointer ...
[2 replies] Last: Okay thanks alot. (by alMarshy)
Signed integer representation in memory
 
I know three ways of representing integers in memory: sign magnitude representation, one's complement representation and two's compliment representation. But wh...
[3 replies] Last: In other words, C++ does not doesn't have a standard way to do that, i... (by magnificence7)
testing bad_alloc exception
 
Hi I'm making a dynamic stack class based on a linked list. When making a new node in the list there is a check for bad_alloc exception: template <class T> ...
[5 replies] Last: One possible thing to do is to add a try-catch block in main around yo... (by jsmith)
by jbl09
what is preventing the arithmatic from displaying?
 
my text file: Monday Tuesday Wednesday Thursday Friday Saturday Sunday 34252 85776 65746 93453 63534 34335 0 78352 23412 89889 88387 48021 89903 0 98098 ...
[1 reply] : Lines 30-34. You are looping correctly to read all the numbers from t... (by jsmith)
May 2010 Pages: 1... 30313233
  Archived months: [apr2010] [jun2010]

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