General C++ Programming - May 2012 (Page 34)

Getting multiple inputs from user
 
Hello All, I'm writing a rectangle program and need a little help. I need the user to enter the names, lengths and widths of four(4) rectangles. What is the b...
[6 replies] Last: Thank you. That is exactly what I did. (by Patrick1322)
Need help with this error code 2664
 
An error code 2664 pops up for this program I am working on and I can't figure out how to fix it. It specifically says: error C2664: 'menu::menu(const menu &)'...
[no replies]
Class Date help
 
I need to have my output in this format for my Class Date: 12/25/10 December 25, 2012 25 December 2012 The output I'm getting right now gives me ridiculous num...
[3 replies] Last: @Lilmish you're a beginner. I think you did great as a beginner. Only ... (by Amil Patel)
processors tasks problem
 
hello everybody, am doing research on processors and am looking for a c++ algorithm that manages tasks on processors ! suppose i have a 2d matrix processors are...
[1 reply] : What problem? (by hanst99)
Need help with ofstream!
 
#include <iostream> #include <fstream> #include <stdlib.h> #include <vector> using namespace std; int main() { ofstream outputFile; outputFile....
[no replies]
by Splux
"Unhandled exception at..."
 
Hi. As the title says, I've started to get an "unhandled exception" error when I EXIT my game, never while playing, to be specific: "Unhandled exception at ...
[4 replies] Last: Alright, I've finally gotten those darn vectors to work with me and no... (by Splux)
Expected unqualified id-"{"
 
I'm trying to write a program using a menu, including 5 functions (add, sub, div, mult, and menu). I'm getting the "expected unqualified id token" message 4 tim...
[17 replies] Last: No trust me, you'r not annoying or anything. Any help is welcomed lol.... (by Seraph1018)
by Owain
Networking
 
Hey, this is a general networking question (I am not very good at networking). I am writing a program which records data from the PC of 'Person Foo' and sends i...
[1 reply] : ... and sends it to anyone with the recivier program. You can use mul... (by kbw)
Implicit pointer conversion
 
Hello, Say we have a Derived pointer. A function takes a Base pointer. Can I do this? void test(Base* ptr) { } Derived* obj; test(obj); I don't ...
[2 replies] Last: FWIW, this is one of the fundamentals of polymorphism (so, a function ... (by rollie)
Object or Variables
 
#include<iostream.h> #include<fstream.h> #include<string.h> using namespace std; int main() { int count,len,i; string name,rev; cout<<"\n how many?";...
[5 replies] Last: Thanks a lot for the help guys (by Shynash21)
Help with making a template
 
I'm trying to convert a class I wrote to a template class. I've never used templates before so I'm not sure how to fix the errors I'm getting. My program calls ...
[7 replies] Last: Alright, Thanks for the help everyone! (by Ishvite)
Don't know where to start...
 
I have to write a program that will write to a random access file called student.dat . In this file will be things like: GPA, Student ID, Name, and the current ...
[5 replies] Last: This is probably the function they want you to use. Have at it! http... (by rollie)
by Ensei
String comparison Question
 
bool readline(int socketfd, string &line) { int n; char buffer ; line = ""; while (line.find('\n') == string::npos) { int n = read(soc...
[2 replies] Last: I just now noticed that I do this comando.erase(comando.end() - 1); ... (by Ensei)
Modifying a string defined in a header file
 
Hey guys, I am trying to modify a C string that has been defined in a header file, however I have been running into segmentation faults. I wrote up some very s...
[2 replies] Last: Thanks for the explanation. (by jasondj)
Messing up with pointers!
 
I was wandering what happens in this example: class A; //Any class, just for the example void f(A* a){ a = new A(); } int main() { A x; ...
[3 replies] Last: Thank you for the reply! That is true, i forgot that &x only returns t... (by tiagomodesto)
Tiff images library
 
Hello Im looking for a library to work with tiff images but i want it to be platform independant. I have already worked with libtiff but i dont know if ther...
[5 replies] Last: Build it from the start with avr-gcc. That will create a library that ... (by Moschops)
Class Functions: fractions/gcd
 
I am attempting to write a program in which the user is prompted to enter the integer values for numerator and denominator of four(4) fractions, named f1,f2,f3,...
[3 replies] Last: So the assignment tells you to use the kind of add, such that a.add(b... (by hamsterman)
by dele
Object Oriented Philosophy
 
Hi, In am new here. Pardon my english, I'll try to do my best. I don't know exactly how to title my question, neither how to formulate it, so I am just going ...
[4 replies] Last: Style-wise, I might implement subtraction of 2 points to return anothe... (by rollie)
Incrementing pointer in conditional statement
 
Hi all! I got this little program to work eventually (see second code excerpt), but I was a little surprised the first version didn't work at all, and I woul...
[6 replies] Last: Thanks again Disch, your explanation was really clear :) The fact tha... (by Terminux)
printf vs cout/scanf vs cin
 
Could someone explain why cout and cin are considered more practical when programming in comparison to printf and scanf? I've heard of something such as overloa...
[16 replies] Last: Thanks. I will have to look at these examples when I get some free ... (by Disch)
May 2012 Pages: 1... 3233343536... 41
  Archived months: [apr2012] [jun2012]

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