General C++ Programming - November 2012 (Page 27)

Need help with outout of a function
 
Well I'm working on some Code, and i have most of it done for myself, but when i run the getInfo Function it just keeps writing over my last iteration. I know t...
[7 replies] Last: So just for future reference if i have a nested structure array i sho... (by coder777)
Sorting random numbers?
 
So I've written this code which lets you decide how many rows you want with seven numbers in it. But I want them sorted and the same number can't appear again o...
[8 replies] Last: @coder777 Yeah I read that yesterday. I forgot to create an array. Th... (by AnEvilVegetable)
how can i add copy constructor to this class
 
this is my class there is a problem with my copy constructor .. is that correct ?? struct Node { Type info; Node<Type> *next; }; template <class Type> cla...
[2 replies] Last: thank you stewbond .. but if you dont mind .. i tried many times to l... (by eric343)
Cipher program
 
I have this assignment . I did too many methods but still needs more to make the program runs as must. The user should be able to work with an ongoing, "curren...
[2 replies] Last: line 48 and following: you have to compare with a constant literal. Wh... (by coder777)
Loop in given time
 
How do I write a program to count from 1 to 100 in 3 seconds?? I know how to do the first part of counting 1 to 100, but got no idea how to write it to be execu...
[4 replies] Last: The Sleep function does this for you. You need to include windows.h fo... (by garanon)
How can I obtain the highest and second highest scores in this C++ program?
 
Define a getTopTwoScores() function with the specification and prototype shown below: // Set highest to the score with highest value and secondHighest to th...
[6 replies] Last: This is my rebuilded example : (I'm VS, what your compiler are you usi... (by Imadatobanisa)
How to know the length of a file before reading it?
 
Its possible to know the length of a .txt file before reading it? I always do the following: char text = "."; fread(text, sizeof(char)||sizeof(int), 5000...
[2 replies] Last: You want to use std::ifstream.tellg(). It returns the number of chara... (by pogrady)
by zombie
type cast problem
 
I want to call a member of a parent class but call a member of the derived class - and I don't know why... The classes look like: class base{ ... pub...
[2 replies] Last: Sorry for the post. In the end it turned out, that I forgot to remove ... (by zombie)
"Program has stop working" problem.
 
So i was assigned a task(assingment) to write a program that calculates and display students Grade Point Average (GPA) and Cumulative Grade Point Average (CPA) ...
[3 replies] Last: Note that while that works, it is allocating something at i=0 but neve... (by Zhuge)
Hey Friends I Need some start up on bookstore program.
 
A bookstore named "X" summarizes its monthly transactions by keeping the following information for each book in stock: Book Identification number, Invent...
[1 reply] : What part of the assignment are you having trouble with? take it one s... (by closed account DSLq5Di1)
Problem with email validation program
 
So I have a program that validates email. It test for things like an @ sign. However, when the function that does this called in main, it does not work. I'v...
[3 replies] Last: The code array is simply a way to keep track of what each individual t... (by Sunny101)
Page replacement
 
I'm implementing a couple different page replacement algorithms (FIFO and LRU) but I'm not sure what the best way to keep track of what pages I currently have i...
[4 replies] Last: I guess I am just going at this the wrong way. This program is getting... (by ResidentBiscuit)
Need help with C++ form!!!
 
I have to do a program that consists of the following requirements. From what I can gather i have to create a program that calculates the area of three edges, ...
[2 replies] Last: i just dont understand what its asking to do i dont know how to start ... (by kelseycrow92)
Flushing stringstream
 
I'm trying to flush a stringstream variable: stringstream x; x << "abc"; x << flush << "def"; cout << x << endl; I expect to see "def" but what I...
[1 reply] : flushing has no meaning for stringstream, as there is no external devi... (by Cubbi)
class within a class accessing accessing other class within the parent class
 
I have some code I want to keep my class from doing too many task I decide to make multiple class with specific task Just imagine I have this kind of situa...
[no replies]
Digit
 
I need your help.. really.. please.. I want to create a class which allows only digits to be stored and other character uses will throw in Exceptions All e...
[2 replies] Last: No problem, help me (by boazgeorge)
by huyly
Help plz :Use VOID fct to write Roman Convert program
 
Hello , This program contains the following functions: Roman : This function needs the year entered by the user and returns the Roman numeral string that rep...
[no replies]
[HELP] Manipulating Bit Patterns
 
Hey, I need some help on this program. I am supposed to read a file like this: CONVERT 00000000 NOT 00000000 AND 00001111 11110000 OR 00001111 11110000...
[1 reply] : I'm gonna do this really roughly, and i'll try to elaborate on it more... (by Thumper)
Automatic variable
 
In short, does C++ support automatic variable? If yes, how to intiate (set value, array init) and automatic variables calculation? My data class seems needs mo...
[4 replies] Last: Always when I see Jackson Marie's posts I wonder how da fack can it ... (by hekri)
Simple Functions Question
 
Hello, I'm new to C++ and having some small difficulties with creating and calling functions. The program has the user enter a sentence, then a letter. The prog...
[2 replies] Last: Like mik2718 said you got problems with input. If you just want a work... (by hekri)
November 2012 Pages: 1... 2526272829... 51
  Archived months: [oct2012] [dec2012]

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