Beginners - January 2014 (Page 28)

by alsade
Array of pointers to derived classes of an abstract base class
 
i have two class: class Rectangle:public Shape { int height; int width; public: void CreateRect(Rectangle*); int GetHeight(Rectangle*); int GetW...
[3 replies] Last: pointer arithmetic is not the problem here. note that it does have an ... (by ne555)
Homework Help 2 question.
 
Hey guys, I need help with two question for my homework on beginners class. I'm using Dev c++ program. 1a- Rewrite the Hello world example in your Dev-C++ c...
[4 replies] Last: may be its will help you #include<stdio.h> #include<conio.h> int m... (by closed account EwCiz8AR)
by SulPC
An if, else with multiple conditions.
 
I'm having some issues with multiple conditions in an if statement that I'm writing. It will compile but my functions fail, I want it to achieve else when a...
[3 replies] Last: @long double main if ( loop1 != 1 && loop1 != 2 && loop1 != 3 ){ } ... (by JewelCpp)
No post-increment operator for type?
 
I want to test my program but it won't even launch because this error message displays saying, "no post-increment operator for type" on line 37. I have tried to...
[2 replies] Last: Also, this is an illustration of why using namespace std; is bad pra... (by Chervil)
Read/Write to file
 
My program works until I read a file and then if I do anything it makes a message pop up that says "Unhandled exception at 0x009622cf in Read_Write.exe: 0xC0000...
[4 replies] Last: Thank you for the help. I did what you told me Chervil and it works no... (by Derek104)
by moreme
Stupid problem with variables
 
Hey Guys!!! I was writting this code and now there is a very simple problem which is eating my brain cause i dont know what the hell is wrong with the code. ...
[4 replies] Last: You can return an array by reference: char ( &GetCharArray( ) ) { ... (by closed account zb0S216C)
Reading from a file problems.
 
So im using getline and reading from a file, and it was working at first now im getting a weird error. If anyone can help me out that would be awesome... i cant...
[1 reply] : Seems like the problem might be in your input file, not your code. (by yulingo)
Overloading functions??/inheritance
 
Hi, is there a way to overload functions (i think that's the right term?) with inheritance? as in, is there a way to make this work? I know I could do this same...
[12 replies] Last: woah no I copied your code into my thing and it worked. I'm officially... (by Nogroth)
DIffrences
 
what is the difference between regular variable declaration and forcing integer literals like this 75 // int 75u // unsigned int 75l /...
[4 replies] Last: The type is different. Note that if the type is not big enough it will... (by Peter87)
Array sorting logic
 
I know there are plenty of threads on the topic, but I wished to start a thread exploring the logic of sorting. Below is a simple sorting algorithm that goes th...
[4 replies] Last: Thanks guys, I'll be looking into this further. (by CplusplusAcolyte)
Constructor implementation triggers error: ISO C++ forbids declaration of ‘Scheduler’ with no type
 
I'm trying to write the constructor for a class, but it gives me a "no type" compiler error. I'm aware it's a basic question but the answers i've found for s...
[5 replies] Last: Oh, I was half joking, but ok. Class namespaces can have: - member fu... (by LB)
by Ephia
setting up Cygwin
 
I just installed Cygwin, but can't get it to work. When I open Cygwin 64 terminal, it look like below. Patrick@WERK ~ $ what should I do to make it wo...
[1 reply] : I don't know why you get the impression it doesn't work - that is a co... (by LB)
by DELB
Unresolved External Symbol
 
Vectors CPP: // Vectors.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include "Vector2.h" Vector2::...
[1 reply] : You need to start a new empty project, not a Win32 or Console project ... (by LB)
by zakkor
What is wrong
 
I seem to be getting a strange error. I am trying to write a 'getter' for an object, but strange errors occur. 'Script does not name a type', when everything se...
[2 replies] Last: Wow, removing that actually worked. Thanks alot. (by zakkor)
How to Get the Apptdata path
 
need Get the apptdata path with this wchar_t *appdata = 0; if (S_OK == SHGetKnownFolderPath(FOLDERID_, System, Startup, Windows, 0, NULL, &appdata ...
[3 replies] Last: Instead of copypasting random code and trying random variations of cod... (by LB)
Again (1,2)
 
It's not my code: bool valid (surname, name) { cout << "You've entered a wrong name or surname" . . . } I know it's a bool function but how would a ...
[20 replies] Last: MikeyBoy is right - you seem to not even understand what a function is... (by LB)
error C2512: 'date' : no appropriate default constructor available
 
Hi, I am getting a very weird error about constructors and I do not know why? When The error occurs in class Biorythm, where it is asking me to create a constru...
[3 replies] Last: You always need a constructor to be able to create a class object. If ... (by Peter87)
by alsade
problem with extracting integer from a line
 
i have this line taken from a txt file: "#operation=1(create circle and add to picture) name X Y radius." (first line in the file) why does this code doesnt ...
[5 replies] Last: After the getline(myfile,line); the stream is already positioned at ... (by Chervil)
by JohnJH
Parsing Member from a class as functions as parameter
 
I am bit unclear why this is incorrect. I trying to use an array as parameter for my member functions, I don't see where i am going wrong here. #inc...
[5 replies] Last: Standard headers often include other standard headers. <iostream> prob... (by Peter87)
Number To Words
 
Hello guys. I am trying to write a program for number to word conversion. I am facing some problems. If i enter a two digit number, result is ok. But when i en...
[4 replies] Last: Oh what a mistake :).. Thank you guys. Everything is good now. (by aprendiz)
January 2014 Pages: 1... 2627282930... 44
  Archived months: [dec2013] [feb2014]

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