-
Replied To a Post in Getline Question
What did you do about it? -
Replied To a Post in Issues?
pritaeas just deleted a duplicate post of mine and now the post reply count is 0 even though there is still 1 reply. I recall someone else reported the same … -
Replied To a Post in Getline Question
In the loop on lines 4-8, where is buffer incremented? line 4 always looks at the same character, which is why it's an infinite loop, unless buffer[0] == '\0' Try … -
Replied To a Post in Help with code error, OOP
The problem is in Data constructor, you didn't initialize Values and Length so alloc() attempted to delete Values when it had a random value. Data(const Data& d) { Values = … -
Replied To a Post in I need a hit!
Your program looks correct -- what are you confused about? -
Replied To a Post in Help with code error, OOP
Please post the steps you took to produce the error. Which menu items did you select, and what did you enter. Better yet, get a screenshop of the console window … -
Replied To a Post in Reading ifsrteam into a char array one line at a time
Yes, the text files normally include '\n' as a line separator. Here's one way to do it one character at a time. I didn't compile or test this code, so … -
Replied To a Post in Can't compile
> line 50: this->i=2; since i is private derived classes cannot change it's value. You need to change base::set() (line 9) to accept an integer, then derived classes can call … -
Replied To a Post in Reading ifsrteam into a char array one line at a time
Just call getline() which will do all that for you. ifstream in("filename.txt"); char buf[80]; while( in.getline(buf,sizeof(buf)) ) { // do something cout << buf << '\n'; } -
Replied To a Post in Member of the Month
At one time there was a link at the bottom of the page to all the archived newsletters. I haven't seen it for a long time now. Too bad. -
Replied To a Post in Copyright at the bottom still says 2013
I've also seen copyright to include the original copyright date as well as the year, such as `Copyright 1990-2014` -
Replied To a Post in Pointer Increment Problem.
When p is an integer pointer then p++ incrments by sizeof(int), not by sizeof(int \*), and the code he posted proves it. Had p been a pointer to an array … -
Replied To a Post in Pointer Increment Problem.
Although what you said is correct, the question was why did the pointer increment by 2 instead of 4, which is not the same as the answer you provided. I … -
Replied To a Post in Pointer Increment Problem.
you can easily find out the size of an int by printing sizeof(int) -- but to answer your question, on most 32-bit compilers sizeof(int) == 4. If you are accustomed … -
Replied To a Post in Member of the Month
Banfa -- gives very good explanations http://www.daniweb.com/members/724268/Banfa -
Gave Reputation to Banfa in Problem with storing strings in 2d arrray
Think about what you are doing, inputing a 1 x 5 array of strings. The first question is is that what you really meant because an array index with a … -
Replied To a Post in Copyright at the bottom still says 2013
That was the year Dani copyright the web site, not the current year. All coptright notices are like that. -
Replied To a Post in How is the weather today in your country?
Snowed again last night, only a couple inches though. -
Replied To a Post in Problem with storing strings in 2d arrray
what you want is something like this: `char i2DArray[5][20]` That will hold 5 names, and each name can be up to 20 characters long. Then on lines 13-17: Note that … -
Replied To a Post in Loops Control Structures
The question makes no sense. -
Replied To a Post in i like openoffice much better than ms office, what do you think?
Beginning with Office 365 (released 2013) it is subscription based, about $150.00 USD per year for 5 licenses and includes all Office programs. Previous versions of MS Office are not … -
Replied To a Post in Birthdays
Thanks everyone. And Happy BD Mike S. :) You're about the same age as my grandson, who recently joined the US Army and now gets to drive around Bradley tanks … -
Created Birthdays
I have another birthday anniversary today, I'm now only 39, with 32 years of experience. -
Replied To a Post in make a menu in C++ (visual studio)
line 16: I'd use int instead of double because there is no need for decimal places. lines 17-31: remove the commas, numeric literals must not contain commans. Also, add a … -
Replied To a Post in Why am I getting this forever loop
your program is not reading anything so fin.eof() never happens. -
Replied To a Post in fprinft fscanf code execution doubt!!
The file is open for writing only. fscanf() is a read function. Solve the problem like this: line 9: open the file with "rw" flag line 15: uncomment that line. … -
Replied To a Post in what wrong with my codes?
please explain why you think something is wrong? -
Replied To a Post in Ever consider splitting the Geeks' Lounge?
There already is one split -- Games -
Replied To a Post in Switch vs. If
You have break statements in the wrong place. Move the break statement on line 42 down to line 71. Move the break statement on line 78 down to just below … -
Replied To a Post in Creating Header File
Almost all games and other major programs consists of many many files. What you learn in school only scratches the surface of what occurs in real life programs. Example: Notepad.exe … -
Replied To a Post in Creating Header File
Lets say you have two files A.cpp and B.cpp, each of them use the functions that are in functions.h. If you put the code directly in fuctions.h the linker will … -
Replied To a Post in Loop unrolling in matmul
Delete both lines 10 and 11. Line 11 will never be executed because of the `k < k` condition in likne 10. [Here ](http://en.wikipedia.org/wiki/Loop_unwinding)is a good article about loop unrolling. … -
Replied To a Post in String+= for a Cstring?
maybe something like this: void mystrcat(char* dest, const char* source) { while(*dest) dest++; while(*source) *dest++ = source++; *dest = 0; } -
Replied To a Post in c++
We are not going to do your homework for you because that will teach you nothing. Give it a try, post the code you have written, then ask specific questions … -
Replied To a Post in Creating Header File
>functions.lib Don't do that! name it functions.c or functions.cpp. functions.lib should be the name of the library, not the name of the source file. In Code::Blocks start a new library … -
Replied To a Post in c++
I like Visual Studio 2014, but it has a rather long and sometimes difficult learning curve. IMO the next best thing is Code::Blocks with MinGW compiler -- it's portable between … -
Replied To a Post in c++
What verson of Borland compiler are you using? Many of the old 16-bit Borland compilers were created before the c++ standards and require \*.h file extension // cin with strings … -
Replied To a Post in Creating Header File
Header files only contain function prototypes, not the functions themselves. You need to put the functions in a library. To use them just link the program with the library (\*.a, … -
Replied To a Post in How to replace a word from a specific location of a file in c++
Read the file one word at a time, saving the words in another file except replace the 5th word (or whatever number it is) with the new word. You need … -
Replied To a Post in Is VB free or do I buy it?
The Ultimate version is only a trial version of the full program and you will be exprected to pay lots of money to continue using it. Donload the free [Visual … -
Edited Edit Curriculum Vitae Error
After changing my password I clicked the Edit Curriculum Vitae link and got the error "Oops! We don't know who you are ...". I clicked the back button and it … -
Created Edit Curriculum Vitae Error
After changing my password I clicked the Edit Curriculum Vitae link and got the error "Oops! We don't know who you are ...". I clicked the back button and it … -
Replied To a Post in Please help
[Here](http://bytes.com/topic/c/answers/218908-why-stdprn-not-defined-under-windows)'s a thread on the same topic. You can open a printer port by opening "lpt1:", but that assumes the printer is attached to the LPT1 port on the computer. … -
Replied To a Post in graphics program in c flickers only when run
There probably isn't anything you can do about it, you are attempting to run a program compiled with a 30-year-old compiler for MS-DOS 6.x and Win95 in a modern operating … -
Replied To a Post in EA Has Officially Ruined Dungeon Keeper !
There are several old MS-DOS games I would like to see ported, regardless of price. [Eye of the Beholder](http://en.wikipedia.org/wiki/Eye_of_the_Beholder_(video_game)) is just one of them. That was a very fun game. -
Replied To a Post in inline function
Also, inlin is optional which means the compiler can choose to ignore it if the compiler wants to. -
Replied To a Post in Speeding ticket calculator
>If I remove the myTicketFineCalculator then I get an error that getFine() isn't declared. I didn't ask you to remove myTicketFineCalulator from that line. Just change the number of parameters. … -
Replied To a Post in function that return value from file
Just multiply the parameter by 100 to get a whole integer, then return the line in the file which has that many digits. Is the file already sorted in numeric … -
Replied To a Post in suggestions for binding MySql to C++
Get [MySQl++ class library](http://live.dadanini.at:8980/mysql/downloads_html/api-mysql++.html). -
Replied To a Post in What movie have you seen lately?
Not a movie, but watched a CNN special **The British Invasion of America**, all about the 50th anniversery of the Beetles in America. Very inteesting, brought back a lot of …
The End.