General C++ Programming - December 2013 (Page 36)

by Ala888
Compiled program error win32 invalid
 
hello, at the moment I am using visual studio 2012 on windows 7. but, when I have compiled my programs and run them on an older pc to test out its functions, I...
[6 replies] Last: If you compile for Windows XP, your program is likely to work the same... (by S G H)
having trouble implmenting switch function.
 
I am working on a piece of code on my project where i have to use a switch function. I want one of the case to say if a students grade is less than or equal ...
[2 replies] Last: so i would have to do it as IF statements then right? this is what i ... (by closed account ETA9216C)
by tarna
Just need the correct syntax please (or a better way would be good too)
 
I'll try to keep this brief. I have multiple classes and some classes have objects from another class as a private member. I created "set" mutator functions to ...
[3 replies] Last: You're doing great. I understand how family issues can get in the way ... (by Duthomhas)
need help finishing
 
this is the program that i have so far. I am trying to finish it but i have some alternate test cases that i need to put into this program and im not sure how ...
[3 replies] Last: this helps alot in the program working properly but i still have one i... (by jarmstrong21)
Array Function
 
What I have to do is Fill an empty array of 10000 with only 1 and 2, which will be placed randomly '1,2' will be placed together in an empty array in only 8 ...
[no replies]
testing conditions for consistency
 
In the below program, when we have 4 consecutive spaces, the following comparison will not be equal: (x / tabstop != (x + spaces) / tabstop). If we have, let's ...
[3 replies] Last: Suppose tabstop=4, that is: there is a mark each 4 characters. x%tabs... (by ne555)
Finding the highest number from a text file
 
Hello, I have a piece of coursework that I am working on, I have to take in certain inputs from a text file which describe employees and the hours they work, i...
[no replies]
basic wrapping
 
hi everyone i just want to ask how to use Textout() to achieve wrapping new line just like notepad format function anyone can help me ? thank you very mu...
[1 reply] : Are you asking about the old BGI textout() graphics function? Give ... (by Duthomhas)
Passing a class as a type in a template class
 
I am trying to pass a class as a type to a template class. This class's constructor needs an argument but I cannot find the correct syntax. Is it possible? ...
[4 replies] Last: Ok, this is not exactly what I was expecting; I was hoping to pass arg... (by ClaudeR)
by Kubani
the '#' sign in C++ coding
 
Hi all, Look at this directive line, #include "iostream.h" or <iostream.h> What that '#' sign means? And why we need to write it in such lines? And...
[3 replies] Last: OK mate, thanks for both of you mates. (by Kubani)
How can I implement this file input format?
 
I want to read something from file and output it to screen. I have a file like this: Material: Alluminum 2.7e3 DryMaterial: Air 1.204 1.983e-5 Material: ...
[2 replies] Last: Thanks, I figured out, using stringstream! (by northfly)
Can someone help me with this?
 
Hi, i was doing one of the exercises in a book i have. The exercise goes like this: Write a program using vectors and iterators that allows a user to maintain ...
[1 reply] : There's a certain problem with mixing cin >> something and getline(... (by long double main)
How much should I try and catch?
 
Hi! I was thinking about ways to design solid and error-prone programs, so I ended up wondering if "try" and "catch" are a good way to handle all exceptions. ...
[4 replies] Last: @Disch Thank you. That was a great answer. I can see how exceptions ar... (by Ramses12)
Can someone please help
 
I am working on a program where i prompt the user for his/her name and i have to verify that the name only contains alphabetic characters. here is my coding....
[2 replies] Last: You are outputting "Valid name" each iteration of the loop. Instead t... (by Michaela)
by fayt84
Drag and Drop 3D Engine (1,2)
 
Would anyone be interested in forming a large programming team to create a 3D Drag and Drop Game Engine?
[27 replies] Last: I'm talking CryEngine one. It was used by so few games... now, CryEngi... (by closed account N36fSL3A)
Array
 
how to insert a variable for the size of array and prompt user to insert the elements for the array?
[13 replies] Last: Thanks for helping guys :) (by chuahyucheng)
Is this the correct way to write a copy constructor for my program? Please spare a moment.
 
I am very worried...I have a project to turn in soon but my program suddenly decided to go crazy on me. Now, it crashes whenever I call a function. I did a bit...
[9 replies] Last: In your copy constructor Player::Player(const Player& other) , make s... (by JLBorges)
by Plavsa
Not going for an input
 
This code: void unosKonacnog(bool *tacanOdgovor, string asocijacija , string prikazA , string prikazB , string prikazC , string prikazD , string prikazKonacno...
[2 replies] Last: Im using while loop in the main, and it works as it should but my prob... (by Plavsa)
Need help with comparing word
 
#include <iostream> #include <fstream> #include <string> using namespace std; void main() { string text, temp , search; int count=0; ifstream openf; open...
[5 replies] Last: You could add a space to the word when you search for it. // input t... (by Catfish666)
Overload virtual member function in polymorphism?
 
I defined a virtual class and three other classes based on it I want to use them like this: int main() { Dirichlet_t D; Neumann_t N; Cauchy_t C; ...
[15 replies] Last: Thanks, ne555! (by northfly)
December 2013 Pages: 1... 34353637
  Archived months: [nov2013] [jan2014]

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