General C++ Programming - November 2013 (Page 9)

Can I use new in class definition?
 
I want to put the new in a switch case structure like: Boundary_t *B; switch(kind) { case Dirichlet: B=new Dirichlet_t(); break; case Neum...
[2 replies] Last: and also just know that its only possible in c++11 compliant compilers... (by closed account Dy7SLyTq)
Wrong<-<-<-<- Slow Answer [SPOJ]
 
I recently here about SPOJ 'Sphere Online Judge' So i signed up and answered the first question and the question was Question A positive integer is calle...
[5 replies] Last: Google is a wonderful thing, I hope this link helps: http://stackoverf... (by Script Coder)
Character array to wide string?
 
I am still working on my project which will be reading some old data from some old DOS files. The data stored there is naturally, char*. Once I read in my chara...
[9 replies] Last: I just wanted to answer Cubbi. I have to read the file into a char arr... (by Sephiroth)
HELP ON HW QUESTIONS
 
Can someone help me find the solutions to the questions below? 1. Declare and initialize two ints yourPlace and myPlace. Make a pointer to each. Clearly...
[1 reply] : Hello, I am also a beginner "coder" and even I know that just plainly... (by wwepensync)
Please help
 
Can someone help me find the solutions to the questions below? 1. Declare and initialize two ints yourPlace and myPlace. Make a pointer to each. Clearly prin...
[1 reply] : Hello, I am also a beginner "coder" and even I know that just plainly... (by wwepensync)
getline messes up program
 
simple program I'm trying to expand a little. But when it loops around, it combines the sentences and messes the progam. I not sure how to make the loop stay th...
[1 reply] : That's because cin >> x; leaves the newline character (from you pres... (by long double main)
Project please helpé
 
I have to make a program and I have absolutely no idea how to go with it. What is excepted of me is to have a entered number, become fragmented, and then resemb...
[6 replies] Last: Thank you, I finished the code now. If you see any errors it's appreci... (by skydragon14)
Using Arrays to find a target value.
 
Hello everyone, I am beginner in C programming, so bear with me if my code is horrendous. I wanted to write a program that will determine a set of values tha...
[3 replies] Last: No, because it is possible to check/select values that add up to somet... (by Duthomhas)
Data File Handling Error, Please Help!
 
I have this code for a computer project... (store management) but the character strings are not copied on text file.. pls help #include<iostream.h> #include<...
[2 replies] Last: The problem is on lines 10-14. Remember that in C++ arrays start at z... (by Duthomhas)
Problems with compound interest program
 
Hey all, I'm slowly but surely learning C++ and keep on getting compiling errors. So, I check my work in an online compiler. After it checks I tweak my code...
[2 replies] Last: Thanks for your help. I tried another simpler program, but it still wo... (by JordanLy)
"I can tell you the future" problem
 
So my program compiles but when the user types in like "What's for dinner?" the whole time goes crazy and repeats everything till I stop it. But if I do "What's...
[4 replies] Last: You just ran into the problem with mixing getline and cin >> someth... (by long double main)
by Cebrus
How to Define an array of unions of bitfields
 
I know that sounds convoluted...to illustrate: I would like to take in data from a real-time clock and format it in an array of the individual registers so th...
[no replies]
Need Help!!
 
Hi, I am a rookie coder. Just installed VC++ Express 2010 and wrote to program, "Hello World" and adding two numbers.But I am getting an error message -- fatal ...
[8 replies] Last: You're allowed to omit the return 0; from main() only. (it has the... (by long double main)
Help with pointers and functions. PLEASE!!!
 
Struggling with this, can't seem to get it to work. Here is what I need to do: 1. Ask the user how many weeks were in the landscaping season this year. 2. Dy...
[no replies]
by clasp1
Windows Forms and C++ question
 
Hi I just recently started learning about using the windows form application for C++. I am using Visual Studio 2010 and I have came across this question. Fo...
[no replies]
by solina
operators overloading in c++ , I need to store words intead of a single letter?
 
I need some help. this is my function class teacher { public: char &operator (int i); protected: char* contents; }; .cpp ...
[1 reply] : You are dereferencing the pointer. However, I doubt that it points to ... (by ne555)
by Dubito
JudgeData project.
 
Hello, I am posting this program of min because I want to se if qnybody can give me some help on how my code should be put together. I am trying to chunk the pi...
[no replies]
Anti Malware
 
I have made an Anti Malware bluff. It doesn't do anything, but I bet I could fool my friends into thinking it works. For some reason it skips to the end of the ...
[no replies]
by solina
Does the polymorphism affects operators overloading?
 
I need some help, I must overload but at the same time I must use polymorphism. I wonder if using polymorphism affects operators overloading since when I modi...
[2 replies] Last: yes I finally get it. Thanks :) (by solina)
arrays/searching arrays
 
I need to write a program that reads up to 25 positive numbers from the user and stores them in an array. The user may indicate completion by entering a -1. O...
[2 replies] Last: I had tried sending an edit but it did not send. I have written it so ... (by kconner)
November 2013 Pages: 1... 7891011... 46
  Archived months: [oct2013] [dec2013]

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