Forum: C++ Mar 12th, 2007 |
| Replies: 1 Views: 2,729 Yes it is possible! Here is a link to a tutorial on file processing:
http://www.functionx.com/cpp/articles/filestreaming.htm
Good luck, LamaBot[ |
Forum: C++ Mar 9th, 2007 |
| Replies: 6 Views: 8,386 I'm quoting myself because didn't write all the code. Just noticed that. Here is the code:
#include <iostream>
#include <string>
using namespace std;
void stripSpace(string &);
int main() {... |
Forum: C++ Mar 9th, 2007 |
| Replies: 10 Views: 3,507 Oh.... sorry. Anyway, when she say's "kills" that could mean crash, but depends. My logic is that if there is a point in a program where an input string or etc. is not checked against its designated... |
Forum: C++ Mar 9th, 2007 |
| Replies: 6 Views: 8,386 I believe that is valid enhanced for loop syntax...? Anyway, I tried the while loop and it, of course, worked. :lol:
Look at this:
void stripSpace(string &str) {
int i; ... |
Forum: C++ Mar 9th, 2007 |
| Replies: 6 Views: 8,386 I've been trying to figure what I'm doing wrong all day. I'm becoming discouraged. Can anyone help me out?
void stripSpace(string &str) {
int i,j,len=str.length();
for... |
Forum: C++ Mar 8th, 2007 |
| Replies: 10 Views: 3,507 What if when she buffers the data read from the socket, it overwrites memory on the stack perhaps causing the instruction pointer to return to a false address after a function call, or to an address... |
Forum: C++ Mar 7th, 2007 |
| Replies: 8 Views: 17,149 Bernt.tc did you care to click the link I'd provided above? The page contains sample code. Here is an example nevertheless:
#include <windows.h>
#include <malloc.h>
#define TOTALBYTES ... |
Forum: C++ Mar 7th, 2007 |
| Replies: 8 Views: 17,149 To reinforce the information ~S.O.S~ has provided on the post linked to by 'this', you can referrence Microsofts website. Here is the linke: http://msdn2.microsoft.com/en-us/library/ms838625.aspx
... |
Forum: C++ Mar 7th, 2007 |
| Replies: 9 Views: 3,314 Sorry my mouse is sticky. |
Forum: C++ Mar 7th, 2007 |
| Replies: 9 Views: 3,314 Also I've noticed the "file" is colored. Is that a key word? That I'm not sure of. If it is, try to change the name to files to see if it'll work that way.
Good luck, LamaBot |
Forum: C++ Mar 7th, 2007 |
| Replies: 2 Views: 824 Also there are many books out there that can help you, on-line tutorials and people can even learn programming off of forums. Before you start learning C++, I'd suggest you download and install a... |
Forum: C++ Mar 7th, 2007 |
| Replies: 9 Views: 3,314 Hello, when you use the code tags, code is not sufficient. For c source code you'd specify the code tag as and for cplusplus code=cplusplus and both have the same closing tag code. Try to use them.... |
Forum: C++ Mar 7th, 2007 |
| Replies: 10 Views: 3,507 It sounds to me that it isn't a connection problem. But to confirm this you could try to execute the server and client on the same system (i.e. localhost). If the same problem occurs than it is... |
Forum: C++ Mar 7th, 2007 |
| Replies: 4 Views: 2,886 You might want to try the networking forums of Daniweb for information regarding applications used to encode/decode BSSMAP/LAP protocol header field/octect information.
Good luck, LamaBot |
Forum: C++ Mar 7th, 2007 |
| Replies: 4 Views: 2,886 I'm not too familar with the BSSMAP or BASSLAP control protocols, however, I've found by observing how other applications work one can can extract ideas based on how an exisiting product(s) works. I... |
Forum: C++ Mar 7th, 2007 |
| Replies: 9 Views: 1,869 I like real people ^ :mrgreen: |
Forum: C++ Mar 6th, 2007 |
| Replies: 2 Views: 1,087 Please be more specific.
Good luck, LamaBot |
Forum: C++ Mar 5th, 2007 |
| Replies: 5 Views: 1,423 The program is pretty dense but I like it. I know the program works but I've modified the GetFactors() function a little to so you another possible way to do it. You can take it or leave it:
... |
Forum: C++ Mar 5th, 2007 |
| Replies: 9 Views: 1,869 Unless you're a genius of some sort then I concur with jwenting. There are some very good programming tutorials out there for C++. Check out this Blog for a link to C++ tutorials and a cool C++ IDE:... |
Forum: C++ Mar 5th, 2007 |
| Replies: 9 Views: 3,924 Maybe you can start one-by-one. Write a function to convert inches to feet. Create another function to convert feet to meters. Then to convert inches to meters, use the inches-to-feet and... |
Forum: C++ Mar 5th, 2007 |
| Replies: 9 Views: 3,924 Programming can be daunting sometimes but it helps to reflect and have a glass of water. Waltp has a good suggestion - you can just use doubles variables and it is relatively easier to split them.... |
Forum: C++ Mar 5th, 2007 |
| Replies: 6 Views: 4,156 Ok at this point in the program, p points to the first element in the list. Keep that in mind.
So no matter what, p is assigned q. Keep that in mind.
So the else is executed if the... |
Forum: C++ Mar 5th, 2007 |
| Replies: 6 Views: 4,156 int main should to return an int.
Good luck, LamaBot |
Forum: C++ Mar 5th, 2007 |
| Replies: 8 Views: 1,851 Very true and I know. I guess I should rephrased that statement.
LamaBot |
Forum: C++ Mar 4th, 2007 |
| Replies: 8 Views: 3,613 Hello and welcome,
Yes any code before the break of a given case in a switch condition can contain any code you like. The nature of switch is to continue executing either until a break is... |
Forum: C++ Mar 4th, 2007 |
| Replies: 8 Views: 1,851 Hey Joe, as ~S.O.S~ pointed out, she or he did use the class name. I provided a brief explaination because I figured she or he didn't know why to put the header file instead of the class name. I... |
Forum: C++ Mar 4th, 2007 |
| Replies: 8 Views: 1,851 Also I'd like to add, if I may, that when you use includes that you use conditional perprocessor directives to prevent inclusions. Basically in the preprocessor phase of the compiling process if you... |
Forum: C++ Mar 4th, 2007 |
| Replies: 4 Views: 2,082 I just want to confirm that it is absolutely necessary for you to write a C++ program running in Windows to determine if Java is installed. If it isn't, you could just write a batch file program that... |
Forum: C++ Mar 4th, 2007 |
| Replies: 9 Views: 3,924 The extraction operator ">>" for cin is overloaded to allow for a different extraction types. In otherwords you can extract an int and double data type with one cin statement, such as the following:... |
Forum: C++ Mar 2nd, 2007 |
| Replies: 6 Views: 3,595 Actually it was a mistake to post that there, I meant to post it in the blogs window I had open. I'm actually not experienced enough to be cocky. The sarcastic perception is direct result of my post... |
Forum: C++ Mar 1st, 2007 |
| Replies: 19 Views: 51,965 I totally agree with you but a newbie would be learning the concepts rather than the specifics. In many beginning programming books and classes they'd probably teach the concepts of programming... |
Forum: C++ Mar 1st, 2007 |
| Replies: 2 Views: 3,655 Please use the bultin tags around your code. I changed it above for you but try to remember to use them. Anyway I've done a similar project where I had to read in an HTML document and determine how... |
Forum: C++ Mar 1st, 2007 |
| Replies: 15 Views: 29,878 There is a problem, I just haven't found it yet. :lol: Just kidding. Looks great and works fine. Kudo's. |
Forum: C++ Mar 1st, 2007 |
| Replies: 3 Views: 1,040 Here's how to difference a pointer, using the "out << obj.getFraction();" as an example:
// If obj pointed to an object of type Fraction
(*obj).getFraction();
// As a opposed to... |
Forum: C++ Feb 28th, 2007 |
| Replies: 6 Views: 3,595 @Joeprogrammer: Just thought I'd guide the newbie and give him some incentive. Please don't tell. :lol: I mean.... crap, I did!
LamaBot
P.S. You need to teach me ascii art; through PM of... |
Forum: C++ Feb 28th, 2007 |
| Replies: 6 Views: 3,595 Software, what a wonderful thing. The hardware that exists within our computer act as a super highway on which our software composed of ones and zeros propagate, giving hardware its true purpose.... |
Forum: C++ Feb 28th, 2007 |
| Replies: 8 Views: 7,520 I'll have to get back at you about how to write the iterative portion. But I've noticed that you have the following code when declaring "_buckets":
// Array of the hash buckets.
... |
Forum: C++ Feb 28th, 2007 |
| Replies: 8 Views: 7,520 Everything looks copacetic except for the above. The "next" member function might produce a compilation error because you specify a pointer and a referrence for parameter "key". But otherwise it... |
Forum: C++ Feb 28th, 2007 |
| Replies: 19 Views: 51,965 I have written pages for my site regarding that issue. To you it is not intuitive. Unless the newbie has a very large string, using strlen isn't a truely bad thing to do; because it will not have to... |
Forum: C++ Feb 28th, 2007 |
| Replies: 19 Views: 51,965 str.lenght() <-- Enclosing Parenthesis
:lol: :lol: :cheesy:
[[ <--- Brackets
[ <--- Opening Brackets
] <--- Closing Brackets
[] <--- Enclosing Brackets |