General C++ Programming - March 2010 (Page 13)

cin questions
 
i'm newby to C++. Small code as follows: int main(int argc, char* argv ) { cout << "function main() .." << '\n'; char ch1; ...
[4 replies] Last: What OS and Compiler are you using? (by Return 0)
how to define custom arrays with templates
 
ok guys we,ve got a class named array with this definition template<class t> class array { private: t*list//array with different kind of types (int , ...
[3 replies] Last: As you've done. template< class T > class mylist { private: ... (by jsmith)
by zootv
What's wrong with this code?
 
This is my code: #include <iostream> #include <iomanip> using namespace std; void main() { float getSheetPrice; float getHeight, getLength; int...
[4 replies] Last: what kind of error's are you getting now? Also If your curious as ... (by Seraphimsan)
Multidimensional Dynamic array with objects
 
Hi, I'm having a little trouble trying to get this code to not return an error. Sprite ** frontBuffer; for (int y = 0; y < 36; y++) { frontBuffer = ...
[4 replies] Last: how did you determine that he needed a 3d array? It's not really ... (by Disch)
Error Messages
 
I am getting the following error messages when I compile my code. Can someone help me out? Here is the error messages: 1>------ Build started: Project: We...
[2 replies] Last: Here is the rest of the code: ClockWindow::ClockWindow(wxWindow* p... (by tepeyton)
C++ Homework Solution Assistance
 
I am in a C++ class in college and we have to write a movie recommendation program. We have to open a text file and read data from it. Then sort the data and ...
[4 replies] Last: I solved the program today. I will post the code to show the solution... (by drg5000)
How can I use std::cin.ignore(); to ignore non-numeric characters?
 
I'm adding this to my Conolse calculator application. If a user types in a non-numeric character, my calculator will go into a fail loop. I was just curious if ...
[2 replies] Last: cin.peek() and cin.get do the job. #include <cctype> // isdigit ... (by maikel)
problem with aray removal...
 
Hi,, I have a small problem with my code. I have an array with a list of numbers from o to n.. And n is the calculated value from a formulae.. I placed them in...
[2 replies] Last: Thanks for the reply.. But my basic question is i have an interger arr... (by gajji2020)
function template specialization an implicit casting of arguments
 
Hi, I am writing a matrix class. As an auxiliary class, I created classes (class view and const_view) that give access to submatrices into the matrix (cf. it...
[no replies]
by raud
end1
 
inorder to move to another line end1 was suggested as an alternative to \n,which however does nt work 4 me,cd i b doing anything wrong
[4 replies] Last: use endl, and not end1 meaning, your 1 needs to be an l, the lowerc... (by Rosso Carne)
Linked List
 
Can anyone clerify this question as i dont understand what it is asking. Write an algorithm for printing a singly linked list in reverse, using only constant...
[1 reply] : Do you know what a linked list is? If you have a structure (class i... (by maikel)
I can't decide!
 
I'm sorry ,i'm not trying annoy anyone, but can anyone tell me which type of c+ should i get? because there are many types such as turbo c+,which one do anyone...
[19 replies] Last: there's also a VS plugin for SVN-integration (called AnkhSVN), which ... (by imi)
Creating a maze
 
Hi I need to create a structure given below. Can any one help me in creating this. I tried a lot using 2D arrays... if w=4 (columns) by h=3 (rows) +-+-+...
[3 replies] Last: It sounds like it would be as simple as putting spaces in the output. ... (by HolyCheeseCube)
Linked List
 
Can i have some tips on this question please. write a function that deletes the ith node from a circular linked list. Any help would be welcome.
[1 reply] : In detail, it depends on your current implementation of a list. There ... (by maikel)
MATLAB mex not recognizing cpp classes
 
Hi all, I've got some experience with doing standalone cpp programming, but the current project I'm working on involves using Simulink. Up to this point, the s...
[no replies]
i need it tomorrow
 
please answer this.... i don't det it.... # include <iostream.h> #include<stdlib.h> int fSelectMenu (); //this function will display the main men...
[2 replies] Last: Triple post huh? http://cplusplus.com/forum/general/20895/ http://... (by HolyCheeseCube)
using one function in different header files?
 
Hi? Is it possible to use a function (void or value returned) in different header files? How to do this?
[5 replies] Last: http://www.cplusplus.com/forum/articles/10627/ (by Bazzy)
Program behaving diffeerently, can anyone spot the problem?
 
The computer stores a random number between 1 and 15 and the player (user) attempts to guess it. The player has a total of three attempts. After each wrong gue...
[3 replies] Last: This would take a couple of easy changes, first you should declare a c... (by HolyCheeseCube)
by helios
Return value of new
 
I always forget this one. I had an interview the other day, and got into a small discussion with the guy about what new returns and when. He said new can always...
[4 replies] Last: Oh, by the way.. it's "std::nothrow" not "no_throw". Whoops.... (by helios)
Basic idea in making a graph???
 
I am taking data structure subject on my university. And I got an assignment to make a graph with vertices and edges. And I don't know where to start. Can anyon...
[4 replies] Last: I am supposed to make the graph and then print it in the adjacency mat... (by soldierno77)
March 2010 Pages: 1... 1112131415... 23
  Archived months: [feb2010] [apr2010]

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