Posts
 
Reputation
Loading chart. Please wait.
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
72% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
Ranked #1K
~20.0K People Reached
Favorite Tags
c++ x 50
perl x 5
c x 4
c# x 4
ios x 3

41 Posted Topics

Member Avatar for sgw
Member Avatar for Hey90

I was reading the discussion here and wondering why did you give up the stl vector idea? > Ok. Can you then set a max on the number of shoe objects then like before? Yes, you can define a maximum of elements in stl vector, even if stl doesn't provide …

Member Avatar for Hey90
0
627
Member Avatar for tanmay.majumdar2

Are you sure you entered value `2` for player 1 and not for player 2? Just a hint. Replace this: char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; // ... if(a%2==1) { cout<<"player 1 enter your num\n"; cin>>b; } else { cout<<"player 2 enter you number\n"; cin>>c; } if(b==1&&square[1]=='1') square[1]='X'; else if(b==2&&square[2]=='2') square[2]=='X'; else …

Member Avatar for CGSMCMLXXV
0
168
Member Avatar for GeneClaude

Well, except for some C coding problems (`conio.h` is not in any standard and `goto` is recommeded for interpreters not for compilers), you have a problem in logic here (lines 51-57): for (csPrelim=0; csprelim<3; csPrelim++) { printf("\nEnter The Class Standing (prelim) :"); scanf ("%f", &csPrelim); if (csPrelim<=49) printf("Invalid Grade!"); } …

Member Avatar for CGSMCMLXXV
0
249
Member Avatar for Beteabmlemma
Member Avatar for Kareem Klas

There is no error in your code. If you want to see the compilation errors, check "Build" from VS menu. If you want to keep the console active, check this thread: http://www.daniweb.com/software-development/cpp/threads/445548/32-console-window-closes-on-program-run

Member Avatar for Kareem Klas
0
179
Member Avatar for McLaren
Member Avatar for Petcheco

As far as I could understand your code, you are bound to run into two problems: 1. redundancy (at every new iteration over `t`, you compute again the set of values which were computed in previous iteration); 2. crash (setting `n` too high is bound to require more memory than …

Member Avatar for Petcheco
0
207
Member Avatar for ziadkassam

Have you tried anything by now? If yes, could you show us what you did and where you got stuck?

Member Avatar for ziadkassam
0
723
Member Avatar for uzair.tabassumwahla
Member Avatar for Moschops
0
177
Member Avatar for uzair.tabassumwahla

Creating a new thread with the same problem won't help you more than explaining your problem. Consequently, you need to explain your problem which should be related to the points where you got stuck. Those points should be related to C++ in this case. So, try to explain what's your …

Member Avatar for CGSMCMLXXV
0
200
Member Avatar for sravya reddy

[Here](http://www.site.uottawa.ca/~ivan/RRS%20AckBSM.pdf) is the pseudocode (page 5 of the PDF, page 37 of the journal).

Member Avatar for CGSMCMLXXV
0
56
Member Avatar for lewashby

bool is_leap_year( int year ) { if ( year % 4 == 0 ) return true; return false; }

Member Avatar for lewashby
0
198
Member Avatar for Hopp3r

> I do know it would be complicated > [...] in this case it is indeed impossible without introducing assumptions about the contents of the array or relying on non-portable solutions. Both right. There is a solution, but is complicated and non-portable. It's both complicated and non-portable because you rely …

Member Avatar for NathanOliver
0
2K
Member Avatar for babuliy

Shortly, inheritence refers to extending/changing the functionality of a class without reimplementing the class. That means, if you have class A and you want to add more (or to change) functionality, you define class B: (inheritance access level: public, protected or private) A which is read as "B inherits A". …

Member Avatar for CGSMCMLXXV
0
137
Member Avatar for finders

Another method is coming from the observation and you don't need `math.h`. Let's have a look at the definition (see previous post): 1010 in base10 = pow(2,3) + pow(2,1) = 10 ^^^^ 3210 = position of each bit So, `1010` is converted from base 2 to base 10 like this: …

Member Avatar for CGSMCMLXXV
0
803
Member Avatar for Doogledude123

Except for the typo or whatever for (i = 0; i = 5225; i--) // ??? try initializing the array with less than 1024 and see if you get the same problem. (edit) At the second thought (I missed that part when I posted the previous message), you have loop …

Member Avatar for Doogledude123
0
283
Member Avatar for myk45

> It's completely safe...because it won't compile. ;) Using `dynamic_cast` won't compile. Using `static_cast` will compile, but trying to access a redefined member (e.g., A has foo() and B has foo() as well) will give you a nice segmentation fault. So, I suppose that is what he meant by "ensuring …

Member Avatar for myk45
0
611
Member Avatar for Elixir42

There is something I don't quite understand in your code: you delete `CurrentNode` and you call `CurrentNode->pNext` after. Does it really call anything that way?

Member Avatar for Elixir42
0
237
Member Avatar for smepperson
Member Avatar for saraaw

> what's your question about the problem? I think this is his assignement for school. Speaking on my behalf, guys, I won't write your homeworks.

Member Avatar for Doogledude123
0
353
Member Avatar for deceptikon

I read that article from Wikipedia in its full length a month ago or so. From what I noticed, the general idea of those changes is to make C++ more competitive and I agree with most of those changes. About uniform initialization, that may come from the languages where the …

Member Avatar for vijayan121
0
429
Member Avatar for ashleytauari

Why don't you put directly `tee` as piped from the `tar -v` command? LOGFILE="log-$date.log" tar cvpzf $backup_dest/$filename $backup_source | tee $LOGFILE

Member Avatar for CGSMCMLXXV
0
186
Member Avatar for hwoarang69

Linux server administration goes pretty much from booting Linux to configuration and installation + compatibility. C/C++ and JAVA most probably for debugging installations and less for dev. LAMP (Apache webserver + MySQL + PHP) pretty much says about what kind of servers they speak about. Also, LAMP can explain why …

Member Avatar for CGSMCMLXXV
0
149
Member Avatar for Archit Gupta

There few major problems with your code (except for mixing C and C++): 1. you confuse room number with entry number; 2. you define a certain size for your arrays from the beginning, while further in your code no condition is imposed (e.g., what if `r` at line 31 is …

Member Avatar for Archit Gupta
0
285
Member Avatar for victor tawiah
Member Avatar for victor tawiah
0
110
Member Avatar for lewashby

> As a side issue, have you tested the getNrDigits function thoroughly? Seems to me that 01172013 and 11172013 are both valid. Does getNrDigits accept both as valid? As long as the numbers are recorded as `int` and not as string or array of chars, `getNrDigits` provides the correct answer. …

Member Avatar for lewashby
0
436
Member Avatar for deceptikon

I would go for `Interpreter` (quite a basic one, though) + `Command`. `Builder` doesn't seem to be appropriate because the menu items are independent (even if you can extend the string defining the menu). My 2c opinion.

Member Avatar for tinstaafl
2
3K
Member Avatar for lewashby

> std::cout << "You entered" << std::cout << date; There is the problem. Try: std::cout << "You entered" << date; (without the second `cout`)

Member Avatar for CGSMCMLXXV
0
91
Member Avatar for lewashby

Here is something to start with: int getNrDigits(int my_int) { int local_int = my_int; int count = 0; while (local_int > 0) { local_int /= 10; count++; } return count; } I hope I didn't missed anything because this was *programming on paper at late hour* as somebody called it …

Member Avatar for Moschops
0
107
Member Avatar for firebird102085

There is all the time a trick you can use: char c; cout << "Press any key to close"; cin >> c; Add this before `return 0`.

Member Avatar for Suzie999
0
333
Member Avatar for ailyn.damiles

Arrays are used when one needs random access of its elements and when insertion of a new element is done by extending the tail of the container. Also, an array can be used when there is a need of mapping one set to another. Otherwise, some other types of container …

Member Avatar for CGSMCMLXXV
-1
78
Member Avatar for Doogledude123

Two simple comments here: 1. If you read char by char from your input file, you don't need `char*`. 2. Is it me or you don't perform any actual reading from the input file? If that is what you are looking for, see `>>` operator (`Map >> gridMap[i][j]`).

Member Avatar for Doogledude123
0
702
Member Avatar for Feal456

Here is another solution in which the articles are set once in `fillProducts`, the rest remains untouched if the number of products is changed. Also, `fillProducs` can have any other logic inside (e.g., reading from a file/database/...) as long as it provides the vector. #include <iostream> #include <vector> #include <string> …

Member Avatar for CGSMCMLXXV
0
3K
Member Avatar for Carolin

The basic idea may be: 1. Define a class/structure/union player. 2. Put the players in a list/vector/array container. 3. Define an RNG (in the case of pyramidal exclusion) or permutation generator (in case of all vs. all) to extract cuoples of players. 4. Add stats to each player at the …

Member Avatar for CGSMCMLXXV
0
137
Member Avatar for mefju

I don't know about MS-VS, but aren't VK_'s vars some sort of constants and not strings? From your description it seems `switch` enters all the time in `default` branch. I might be wrong though because I am not into MS-VS.

Member Avatar for Ancient Dragon
0
244
Member Avatar for asteriskLMNOP

Following your logic, there are two options I can think of in this moment: 1. create a static member in each A1 and A2 to keep the description of the class and you can access it in if condition; 2. if the description of each child doesn't change, you can …

Member Avatar for ravenous
0
1K
Member Avatar for pjh-10
Member Avatar for CGSMCMLXXV
0
95
Member Avatar for Vasthor

There is a nice and short explanation about the difference in between derefence and reference operators here: http://www.cplusplus.com/doc/tutorial/pointers/ These two operators can be tricky sometimes. I know it from my own experience. ;)

Member Avatar for Tumlee
0
941
Member Avatar for ThatBitchYeah

Few problems here: 1. Function definition inside another function (take all the function definitions outside the `main` function scope). 2. Missing `}` (you open 4 curly brackets for: `main`, `while`, `if`, `if` and you close only 3 curly brackets). 3. Missing `;` after `scanf` (line 75) 4. Is there any …

Member Avatar for CGSMCMLXXV
0
159
Member Avatar for Dewey1040

The extraction operator (>>) should have nothing to do with your error because `seekg(0, ios::beg)` is modifying the internal stream pointer. For example, the code: #include <iostream> #include <fstream> using namespace std; int main() { ifstream f ("example.txt"); int x, y; for (int i=0; i<3; i++) { f >> x …

Member Avatar for CGSMCMLXXV
0
155