Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Tags
c++ x 22
php x 2
Member Avatar for blee93

I am doing Project Euler Problem 3, but I seem to get stuck. I have written some code that makes sense (at least to me) but keeps printing the answer to 137. This is the problem: The prime factors of 13195 are 5, 7, 13 and 29. What is the …

Member Avatar for vCillusion
0
359
Member Avatar for blee93

I just started learning PHP and I tried looking for answers, but couldn't find any. When i type in [CODE]<?php echo '<p>Order processed.[/CODE] embedded into HTML, it works fine, but when I put [CODE]<?php echo '<p>Order processed.</p>' ?>[/CODE] it always has the closing tag '?> shown in the browser. Is …

Member Avatar for mikulucky
0
396
Member Avatar for blee93

This is my failed attempt at creating the Sieve of Eratosthenes. Can anyone spot any problems? I just started to learn the STL, but the concept of iterators and the STL in general is really difficult for me. -The input represents the number of cases. The variable m represents the …

Member Avatar for Narue
0
134
Member Avatar for blee93

How would I convert a string to an integer? I found a method online, but I don't really know how it works. The method is subtracting the character '0' from the character. Supposedly, this makes it an array, but I do not know why. Can anyone explain why? And are …

Member Avatar for frogboy77
0
205
Member Avatar for blee93

Hi, I am doing Question 4 of the Project Euler puzzles. I wrote some code which is supposed to find the biggest palindrome from the product of 2 numbers. However, this always prints out 900099. I cannot really find any errors in this code, but if you do, please let …

Member Avatar for blee93
0
107
Member Avatar for blee93

[CODE]#include <iostream> #include <cstring> using namespace std; class Cow { char name[20]; char * hobby; double weight; public: Cow() { strcpy(name,"peter"); strcpy(hobby,"nothing"); weight = 1.0; } Cow(const char * nm, const char * ho, double wt) { int len = strlen(ho); strncpy(name,nm,19); name[19] = '\0'; hobby = new char[len + …

Member Avatar for blee93
0
229
Member Avatar for blee93

Hi, I began file I/O and I did exactly what it said in the book I was using and it doesn't seem to work for some reason. Am I doing something wrong? [CODE]#include <iostream> #include <fstream> using namespace std; int main() { ifstream fin("hello.txt"); if (fin.is_open()) cout << "It's good"; …

Member Avatar for blee93
0
132
Member Avatar for blee93

Hi, I wrote this code for C++ Primer Plus, but I don't really get why it doesn't work. [CODE]#include <iostream> #include <cctype> using namespace std; int main() { char ch; string str; int vowels = 0; int consonants = 0; int others = 0; cout << "Enter words (q to …

Member Avatar for Red Goose
0
223
Member Avatar for blee93

This problem was from the book C++ Primer Plus Chapter 4 #8. The point of the code is to create a structure and use the new keyword to dynamically create a new structure. This problem makes me alter my code for the previous problem in the book so that I …

Member Avatar for blee93
0
120