Thank you, Zuk & Matticus. I've had some problems with Eclipse, but it seems to work properly now that I use Code::Blocks.
Type: Posts; User: Roffemuffe
Thank you, Zuk & Matticus. I've had some problems with Eclipse, but it seems to work properly now that I use Code::Blocks.
What I would want is of course:
This code runs. However, when I run it, the text from printf doesn't appear until after I type in the two numbers.
I use Wascana, will it run corectly on other compilers?
#include <stdio.h>...
Thank you, Jim. I did, by all means, not intend to start a war of factions. :o
I've been talking to some local people, so I will most likely end up with gcc & NetBeans or Code::Blocks.
I'm about to choose where to program in C (or C11 preferably).
I don't have any chosen platform (OS,GUI/IDE) yet, but I need my programs to be very easily portable to other OS's (primarily Linux &...
I want to learn C programming (reason: microprocessor programming in electrical engineering), but I want to get a head-start and learn the jargon and basic skills before school starts. So I got my...
I'm not sure I understand...
I did try to make a STUD(); in the class definition. No difference.
I was under the impression the Vip::Vip( /*... */); -constructor was causing the problems?
I am becoming silly about this problem.
I can't seem to be able to get an inheritance past the second step of inheritance.
I need Person->Student->Vip inheritance, but somehow it stops...
This is the solution I've come up with so far:
SubClass *pSubs = new SubClass("Billy", "Home", 555);
string name = pSubs->GetName();
string adress = pStud->GetAdress();
string phone =...
Yes, SubClass is derived from ParentClass.
the "string Name" and "string Adress" are in the ParentClass, while "int Phone" is in the SubClass.
How would I use pointers to point directly to an...
I am not sure what you are asking, but as I see it, there is no AI implemented at all yet?
Have you tried meta-planning?
How does the computer win the game? 3 in-a-row, of course, so...
I want to make a vector that can input data to via classes and save it in a file.
I have done some testing but I don't see how I do cout the entries?
I am assuming I have a vector here?
...
Thank you, solved my problem entirely.
I was on track with the enum, but I just couldn't see that the enum-name "Coins" was a type and not a name to a type.
I have this big problem with using enumerators in a class function
class Automat
{
public:
void print();
int AddCoins(enum Coins, int MoreCoins);
private:
The part outside the while loop isn't used. As far as I can see, it reads a number, then goes to while-loop, reads a new number and works on that number, but forgets to work on the first number I...
I don't want to initialize n1 since it can be any positive number and I risk initializing it higher than the inputted number.
int main(void) {
float n1, max=0;
...
Thanks C_ntua
I continued work, and I think I have simplified it a bit:
int main(void) {
float n1, max=0;
while (n1 > 0)
{
Just starting C, so I have some problems with the basics!
I have several inputs and need to identify the largest inputted number.
I am told by my teacher to use a loop.
so far I have this
...