Posts
 
Reputation
Joined
Last Seen
Ranked #626
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
61% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
3
2 Commented Posts
~42.8K People Reached
Interests
C++, Lightwave 3D
Favorite Forums
Favorite Tags
c++ x 326
c x 91
Member Avatar for JoBe

Hello ladies and gents, Chapter 3 exercise 3-1: [quote]Suppose we wish to find the median of a collection of values. Assume that the we have read some values so far, and that we have no idea how many values remain to be read. Prove that we cannot afford to discard …

Member Avatar for Alfonso_4
0
850
Member Avatar for JoBe

Hello ladies and gents, Was wondering if any of you could help me out, how can I count the amount of numbers(digits) there are in one integer, for example: int integer = 123; integer has three digits. int secInteger = 10; secInteger has two digits. The reason for asking is, …

Member Avatar for jimmyraynor
0
343
Member Avatar for Fasola

In my old C++ programming classes I would often trip up on theses basic concepts when things got more and more complicated: 1. Arrays 2. Functions 3. Inheritance 4. Call by Reference 5. Call by Value 6. Pointers I kind of know how they work but don't really know what …

Member Avatar for A.Rehman Amjad
0
1K
Member Avatar for JoBe

Hello ladies and gents, Had to make the following exercise in Accelerated C++ Write a program to calculate the average of the numbers stored in a vector<double>. THis was my solution: [code] #include <iostream> #include <iomanip> #include <vector> using std::cin; using std::istream; using std::cout; using std::setprecision; using std::endl; using std::vector; …

Member Avatar for NP-complete
0
268
Member Avatar for boyjim32

Problem 2: Write a program which will accept the price and description of three items. It will then display the total price of the three items as its output. Here is a sample output: First Item: ruler Enter price: P 32.50 Second item: notebook Enter price: P 25.00 Third item: …

Member Avatar for mvmalderen
-1
245
Member Avatar for tino

Hi' there... Anyone with an interest in AI ?? We have been working on an AI-system for quite some time and now invite others to participate. The basic concept in the "game" we are constructing is as follows: You have an aquarium filled with 3 types of insects. By adjusting …

Member Avatar for tino
0
251
Member Avatar for JoBe

Hi Danny, Was wondering when you scrolled down all the way to read the thread you're interested in, there's no way to either go to the top of the page or push a button to go back to view the forum in which the thread was started ? Wouldn't it …

Member Avatar for JoBe
0
57
Member Avatar for CPPRULZ

OK I'm a beginner at C++ so don't mock me for this question, so when I declare a pointer ptr (int *ptr; ) and then define ptr as 5 by saying *ptr=5; what adress is ptr pointing at-a temporary variable? Thank you-just curious.

Member Avatar for JoBe
0
125
Member Avatar for kjsalk

hello everyone in need of a little help here.i am beginner to programing and i have to produce a program that 1 outputs a message to the moniter asking the user their age as a whole number 2 use the input method to obtain a whole number from the user …

Member Avatar for kjsalk
0
113
Member Avatar for clutchkiller

When switch"ing" (....) If the user inputs 1, would you just use case 1: or case '1': thnks

Member Avatar for clutchkiller
0
134
Member Avatar for t_s

I have been searching (google and books) for an answer to this question for a long time without managing to find any answer worth the name, so I'll try posting a thread hoping for better luck. Can someone explain to me why this: [code=C++] Aclass **tmp, *aclass[10]; tmp = aclass; …

Member Avatar for t_s
0
109
Member Avatar for JoBe

Hi all, I have a class which contains a struct that holds some variables, string, int's. Now, one of the variables (string) in the struct is used to compare it with a name, if the name is in the struct, it has to be [COLOR="Red"]returned from my function [/COLOR]with it's …

Member Avatar for JoBe
0
137
Member Avatar for LuckyMe444

Hello! I need some help figuring out how to display my array. The program I am working on is one in which the user can enter any given 20 integers and it display them in descending order. I was able to get that part to work but cannot get the …

Member Avatar for LuckyMe444
0
82
Member Avatar for Yaserk88

Ok. I'm not experienced at all, and I need to program a set of different math formulas into a code. Here is the first step I'm trying to take. I have an octahedron that has 8 plates. Each plate is composed of 3 vectors. There are 6 vectors in total …

Member Avatar for dougy83
0
97
Member Avatar for cpp noob

hello i made this black jack game its showing few bugs and stuff , spent a long :sad: time and i cannot figure out what to do . please help correcting :cry: i would also appeciate a smaller version of this progrm. :surprised thank you :cry: this is for "tc.exe" …

Member Avatar for CrisRo
0
295
Member Avatar for JoBe

Hi ladies and gents, Wanted to ask a simple question probably for you guys and the answer will maybe be simple aswell, but, I thought, what the heck, I'll go for it :) It just seems strange that when everyone tells to use <iostream> instead of <iostream.h>, <cstdlib> instead of …

Member Avatar for Ancient Dragon
0
342
Member Avatar for JoBe

Good evening ladies and gents, Had a question concerning this piece of code that I'm trying out from a book, it supposed to open a file, write text to it, close it, reopen it, append text to it and then write the text from the file to the console screen, …

Member Avatar for JoBe
0
137
Member Avatar for JoBe

Hello ladies and gents, Got a question, is it wise to create a member of a class by using another class it's constructor and deleting it threw the use of that class it destructor? For example: [code=cplusplus]// Testing code. #include "first.h" int main() { first myMenu; bool gameLoop = true; …

Member Avatar for JoBe
0
119
Member Avatar for JoBe

Hello ladies and gents, It's been ages since I posted here, have been doing some coding on and of and I was wondering about the following, beneath is a test I made in trying to use the new operator in combination with a string, first a string literal, second time …

Member Avatar for JoBe
0
4K
Member Avatar for JoBe

Hello ladies and gents, Ive got an exercise in which I have to fully parenthesize expressions using the higher-lower precedence, for instance: a+b*c would become (a+(b*c)) because multiplication has a higher precedence then addition. Here are my solutions for the following expressions: 1) a = b + c * d …

Member Avatar for ~s.o.s~
0
171
Member Avatar for JoBe

Hello ladies and gents, Gotta few questions if you don't mind: 1) Exc_6_4) Wrote a table of values for the bitwise logical operators and was wondering if any of you could check them out whether they are correct this way. 2) I have to write five examples of undefined behaviour …

Member Avatar for Ravalon
0
188
Member Avatar for Lynqu2

Hi everyone, I'm new here and this is my first post. Like the title says - I'm new to the whole coding and programming thing, I really LOVE the thought and the idea, I've started out with XHTML and CSS, it's going easy so far and I think I have …

Member Avatar for Lynqu2
0
447
Member Avatar for JoBe

Hello ladies and gents, Was wondering if any of you could help me out with the following, sometime ago I had to reinstall MS V++ EE and ever since then, when I enter for instance 'std::' or 'cin.' I don't get a list with all the possibilities it has, normally …

Member Avatar for JoBe
0
117
Member Avatar for senguptapallab
Member Avatar for green_oasis

I have the following C++ code: [code=cplusplus] class A { private: long num1; }; class B : public A { private: void f1(); }; class C: public B { private: virtual void f2(); }; int main() { cout <<sizeof(A)<<endl; cout <<sizeof(B)<<endl; cout<<sizeof(C)<<end; }[/code] Would someone please help me with the …

Member Avatar for ~s.o.s~
0
166
Member Avatar for JoBe

Hi guys, This exercise goes as follows: - Write a function that counts the number of occurences of a pair of letters in a string and another that does the same in a zero-terminated array of char(a C-style string). For example, the pair "ab" appears twice in "xabaacbaxabb". Now, I …

Member Avatar for Dave Sinkula
0
366
Member Avatar for JoBe

Hello ladies and gents, I'm trying to copy two words, for instance test and word into an array of characters and have this: [CODE]#include <iostream> int main() { char word[10]= ""; char *wordArr[10]; for(size_t i = 0; i < 2; i++) { std::cin >> word; *(wordArr + i) = word; …

Member Avatar for WaltP
0
341
Member Avatar for JoBe

Hi, Got another question concerning an array of strings: I did it this way: [code] int main() { const std::string myArray[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; for (size_t i = 0; i < 12; i++) std::cout << myArray[i] << '\n'; std::cout …

Member Avatar for JoBe
0
605
Member Avatar for JoBe

Hello ladies and gents, I just made the next exercise of this book and although it works as it should, [I]I was wondering if any of you guys could tell me whether or not it could be improved.[/I] The exercise goes as follows: - Define a table of the names …

Member Avatar for JoBe
-1
146
Member Avatar for pratigya

whats wrong with this code it compiles well but gives wrong results code is to arrange the 5 numbers in ascending order [code=c] for (a=0;a<=4;a++) { for (b=a+1;b<=4;b++) { if (num[a]>num[b]) { temp=num[a]; num[a]=num[b]; num[b]=temp; } } } [/code]can anyone tell whats wrong??

Member Avatar for Salem
0
218