Search Results

Showing results 1 to 17 of 17
Search took 0.00 seconds.
Search: Posts Made By: Lazaro Claiborn ; Forum: C++ and child forums
Forum: C++ Mar 7th, 2007
Replies: 9
Views: 3,369
Posted By Lazaro Claiborn
Sorry my mouse is sticky.
Forum: C++ Mar 7th, 2007
Replies: 9
Views: 3,369
Posted By Lazaro Claiborn
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: 9
Views: 3,369
Posted By Lazaro Claiborn
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 5th, 2007
Replies: 6
Views: 4,219
Posted By Lazaro Claiborn
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,219
Posted By Lazaro Claiborn
int main should to return an int.

Good luck, LamaBot
Forum: C++ Mar 1st, 2007
Replies: 19
Views: 53,603
Posted By Lazaro Claiborn
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++ Feb 28th, 2007
Replies: 19
Views: 53,603
Posted By Lazaro Claiborn
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: 53,603
Posted By Lazaro Claiborn
str.lenght() <-- Enclosing Parenthesis

:lol: :lol: :cheesy:

[[ <--- Brackets
[ <--- Opening Brackets
] <--- Closing Brackets
[] <--- Enclosing Brackets
Forum: C++ Feb 28th, 2007
Replies: 19
Views: 53,603
Posted By Lazaro Claiborn
Well that'd be the problem if the string contained a massive amount of characters - which you nor I know. I read the link you'd posted and I still don't realise the problem. Lol. :lol: I realised...
Forum: C++ Feb 28th, 2007
Replies: 19
Views: 53,603
Posted By Lazaro Claiborn
Umm... obfuscated???? It is rather easy to understand, which is why I wrote it like that. Actually, strlen(str.c_str()) could be replaced with, say "str.length" perhaps. However, it is not...
Forum: C++ Feb 28th, 2007
Replies: 19
Views: 53,603
Posted By Lazaro Claiborn
Here is a function that'll do it:

string UpToLow(string str) {
for (int i=0;i<strlen(str.c_str());i++)
if (str[i] >= 0x41 && str[i] <= 0x5A)
str[i] = str[i] + 0x20;
...
Forum: C++ Feb 27th, 2007
Replies: 3
Views: 1,087
Posted By Lazaro Claiborn
The function doesn't return anything, so you need to use "void". Second, Quote will terminate once the function exits which you can extract later so you'll need to pass by reference or via pointers....
Forum: C++ Feb 21st, 2007
Replies: 26
Views: 5,559
Posted By Lazaro Claiborn
You're right swap and replace are not suitable for this OPs code, that wasn't my point though. If I really would of suggested something it'd probably would of been the following:


eos =...
Forum: C++ Feb 20th, 2007
Replies: 26
Views: 5,559
Posted By Lazaro Claiborn
Ok that makes a load of sense. :confused:



I guess I don't like to use "new" unless declaring a new class instance. I rarely use it for a structure but I thought I'd remind if not inform the...
Forum: C++ Feb 20th, 2007
Replies: 26
Views: 5,559
Posted By Lazaro Claiborn
If this were a C++ program why use strcpy instead of str::swap, swap or std::replace? And if you didn't notice, I mentioned it is an alternative method; I personally don't like to see a lot of...
Forum: C++ Feb 20th, 2007
Replies: 26
Views: 5,559
Posted By Lazaro Claiborn
Being the nerd I am, I'll give my opinion on this particular issue. If you're going to use a structure data type, I'd just use malloc instead of new to allocate memory on the heap:

PCourant =...
Forum: C++ Jan 16th, 2007
Replies: 9
Views: 3,426
Posted By Lazaro Claiborn
void checkRecords()
{
ifstream semData("data.txt", ios::binary);
if (!semData.is_open())
{
semData.close();
ofstream semData("data.txt", ios::binary);
...
Showing results 1 to 17 of 17

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC