Beginners - August 2015 (Page 19)

guess the random number-some problem
 
Hello everbody! I tried to write a code to generate a random number that the user will then guess. My problem is, I alweys get 42, and i don't know why..can som...
[1 reply] : > My problem is, I alweys get 42, and i don't know why The C random n... (by JLBorges)
Not sure if this is right.
 
Not sure if I'm heading in the right direction. I just attempted to do the first part, I found this article here on the forums for beginners and I'm giving it a...
[12 replies] Last: Thanks obscure! (by closed account yR9wb7Xj)
for loop that iterates 10000 times and outputs a dot every 100 iterations?
 
hi so I'm trying to do this challenge(in the title) I have an idea of how to use the for loop. But I'm lost on how I'm going to output a dot every 100 iteration...
[4 replies] Last: i thought about using the if statement but I just couldn't figure out ... (by helios103)
by fguy
Multi-dimensional arrays and pointers.
 
Greetings. I am working on an exercise where I have to print a two dimensional array using pointers. I can't use any of auto, decltype, or type aliases. The cod...
[5 replies] Last: > Pointers always confuse me. This points to this which points to that... (by JLBorges)
by nurfz
Inheritence and "this"
 
As it stands right now, I'm not finding OOP very useful because "this" is not referencing what you would expect. It doesn't seem like the object is able to do ...
[5 replies] Last: #include <iostream> #include <string> class Animal { public: ... (by JLBorges)
Convert int to char in C++
 
Hello C++ world, New to this forum (and C++) and glad to join the community.. I have the following piece of code written in C: printf("The ASCII cha...
[4 replies] Last: Hello It works fine. It's part of a program that sums 8 bits together... (by raylier)
by Numala
Trouble with user input in OOP
 
This program will be used to calculate the voltage and the current. It needs to have an interactive menu where the user can freely choose. i am thinking the ...
[4 replies] Last: @obscure, Of course thanks for pointing that out. My understanding is ... (by CodeWriter)
by lamper
Magic outputs that I am experiencing.
 
I have coded a quite long code and I use boost for multithreading (3 threads, two of them depend on each other) I am obtaining very weird results, namely: IS...
[6 replies] Last: you may be invoking undefined behaviour. Run through valgrind to detec... (by ne555)
Returning By Reference Question
 
My understanding of returning by reference is that when you return a local variable by reference from a function, you should get garbage values, but the followi...
[5 replies] Last: Glad you had your problem solved :D I just wanted to mention... Don't ... (by sasauke)
by salsa
tUts
 
Alright so you may remember me from when I was 10, but I stopped programming. Anyone got a good place for simple tutorials? Thanks.
[1 reply] : If you're interested in learning C++, you could try the tutorials on t... (by Bogeyman)
Inheritance problem
 
#include <iostream> using namespace std; class Character { public: void display() { cout << health; } protected...
[7 replies] Last: Thank you JLBorges for your detailed reply. Since you have learnt ab... (by Bogeyman)
Why is this giving me an error
 
Why am i getting an error here, the !b->empty() gives error #include <iostream> #include <string> #include <vector> using std::cin; using std::cout; ...
[4 replies] Last: If you want to check the new line character, do it like so: for (s... (by coder777)
by AVM8
Switch statement
 
I want to know how to do Switch statement? When user enters Y it will exit and if user enter N, the program will redisplay the menu. Im stucked here. Hence th...
[5 replies] Last: [quote=camycent]We can also apply this code: No, that doesn't work wit... (by coder777)
Destructor
 
I know that the destructor is used to free the dynamically allocated memory. Is it also correct to say that the destructor is used for destroying an object?
[5 replies] Last: I want to chime in and say that it is incorrect. Destructor does not... (by ajh32)
New with vectors. Pls help
 
So let's say we have some dates: 2010 12 25 2011 01 15 2010 11 01 is there a way to get these 3 lines into one vector , but so it would be similar to an arra...
[4 replies] Last: #include <algorithm> #include <iostream> #include <vector> struct da... (by MiiNiPaa)
Windows hang while reading files
 
Hi guys! I made an applet, which reads the names of files in folders, checks their release date + version and puts them in a list in MFC. The problem is that t...
[2 replies] Last: > it gets stuck while reading exe files. If there is a real-time anti... (by JLBorges)
by SafaC
What i need to do?
 
Question is about how to insert pictures in black screen. i've recently started learning c++ through tutorials some parts confusing some parts are not and it...
[3 replies] Last: so graphic libraries i was looking for. can i use them with dev c++? a... (by SafaC)
Parameter of function that has Pointer to a function
 
Could someone please help me? I am not sure how to solve this. I have a header file named Person.h, where I have placed the function prototype int...
[3 replies] Last: Should I create the Person object? Well, you cannot call nonstatic me... (by MiiNiPaa)
by Mr D
Random Number Generation Range Issues
 
Coding a guessing game with difficulties. The secret number can range anyone from 1 to 1000000, but when generating the number for anything over about 10000, I ...
[5 replies] Last: ...or just use the stuff in <random>. Complete with examples: http://... (by Duthomhas)
by AVM8
Queue Numbering system.
 
I got an error. I dont re-call how to solve this error #include <iostream> #include <queue> #include <string> #include <algorithm> #include <time.h> #inclu...
[9 replies] Last: LB corrected. Thank you my friend. (by AVM8)
August 2015 Pages: 1... 1718192021... 28
  Archived months: [jul2015] [sep2015]

This is an archived page. To post a new message, go to the current page.