Beginners - July 2014 (Page 38)

by mehak
float and double
 
if i change the value of f and d to 10.5 it prints hi but if i give the following input it doesnt print hi,please help! #include <iostream> using namespa...
[5 replies] Last: what compiler are you using? in this case, MinGW GCC 4.8.1 32-bit. ... (by Chervil)
by mehak
objects
 
in the main function we are calling a 2 argument constructor,which in turn calls the bixbase constructor with the given parameters in the derived class object,s...
[3 replies] Last: What is happening is that when you derive from a class, it is as if it... (by TwilightSpectre)
A simple factorial program
 
Trying a simple factorial program but it prints out 1 all the time. any help ... #include <iostream> using namespace std; int main() { int n...
[2 replies] Last: SHIT. sorry for asking such a basic question. thanx peter87 (by Sanilk21)
Random Number generator ?
 
i want to write a random number generator that generates a number between 1 to 100. i have tried random() function but it prints out the same number every time....
[1 reply] : There are two ways of doing this. The easy C-style way is to use the ... (by TwilightSpectre)
by mehak
splitting an array into negative and positive
 
here i want to split an array into an array of positive and negative numbers,however i dun want my output to show the zeroes at the end,please help! #incl...
[2 replies] Last: here i want to split an array into an array of positive and negative ... (by cire)
by h4ever
Error C1021: invalid preprocessor command 'warning'
 
I tried to configurate project to use ImageMagick library as described here http://www.imagemagick.org/Magick++/Image.html and I got the error C1021: inva...
[4 replies] Last: Ah, yes. I remember, they told it somewhere in reference. So I need to... (by h4ever)
using for loops to generate both figures and asterisks
 
plyz cud some1 help me out with displaying 1***** 12**** 123*** 1234** 12345* 123456 using for loop statement
[4 replies] Last: [quote=mehak]i tried the above question but could not find y my loop i... (by cire)
Split array into positive and negative
 
I have a program where I've filled an array with 20 positive and negative integers. I'm supposed to split this original array into two different arrays, one for...
[2 replies] Last: Got it, that fixed the problem. Thanks so much! (by sunny80)
by bonho
Weird result in ReadFile for named pipe
 
I had been trying to pass a struct between processes via named pipe (using IO overlap. This struct is simply a string plus a double. It was working ok when I ...
[2 replies] Last: thanks that works great (by bonho)
by Jakee
Visual Studio 2013 won't display line numbers for errors
 
So the Visual Studio 2013 IDE is not telling me where I am getting errors in my code, is there an option to display them? I keep getting this:http://i62.tin...
[2 replies] Last: Fixed it, my constructors were not set to default. (by Jakee)
Problem with error LNK2005
 
I'm trying to use a variable to represent a players health but when I try to use it I get error LNK2005. in battlesequence.h I have "int health = 100" ...
[5 replies] Last: Glad I realized I was taking too long to type and did a refresh :) Yo... (by Lowest0ne)
Hi there! -- Could use a bit of help?
 
I've recently enrolled in an introduction to C++ class and could use to help with several problems. I've already tried googling, which helped to a degree, but t...
[19 replies] Last: Instead of if (StartTime >=1800 || StartTime<800) if (LengthofCal... (by Yay295)
Can anyone help me with this
 
Basically here is my code, what it is supposed to do in a game I am coding is when I right click on the NPC "Ayla it should start talking to her and start the Q...
[1 reply] : None of this looks like C or C++. It looks similar, but it's not. Are ... (by Yay295)
What's really going on?
 
Hey there, I just completed problem 1 of projecteuler.net, however as I was working with my code I noticed something odd, which I would love to have explained....
[3 replies] Last: Well the solution is incorrect relative to the problem I'm trying to s... (by tunkthefunk)
Random number game issues
 
I need my code to display certain messages after it states you won depending on how many guesses it took the user to get it right. guesses < 4 "Either you kno...
[1 reply] : The first thing you need to do is break out of the loop when the corre... (by jlb)
Files 1
 
Hello I implemented this code to the teacher pseudocode and for some reason it doesnt complete the transaction // Name: Liat Ledder // Email: ledder.liat...
[4 replies] Last: Yes the files open succesfuly.. I wish there was a way I could attac... (by Chervil)
by Tikah
overloading operators for template classes
 
Hello! Say I have a class like this: template <typename T> class myClass { public: T x, y; myClass(T a, T b) { x = a; y = b; } const myCla...
[9 replies] Last: Wow, I'd never seen decltype (even if I had I probably wouldn't have t... (by Tikah)
Equastion to select at the beginning of the program
 
I am a beginner and self taught. I've written the following program for electronic calculations. I want to select the correct equation ONLY and find the unknown...
[no replies]
Files 2
 
Hello Just like my previous question this is a code i implemented to the teacher psuedocode but it doesnt process // Name: Liat Ledder // Email: ledder.liat@t...
[1 reply] : I suggest you get one problem fixed, then move on to the next program.... (by jlb)
Erase an element in vector
 
I want to erase a data in an element of a vector. Attributes in the vector are name, id, salary. Let's say I just want to delete the data in salary, makin...
[2 replies] Last: Is it possible? Yes. Can anyone tell me how to do that? You'll n... (by jlb)
July 2014 Pages: 1... 3637383940... 43
  Archived months: [jun2014] [aug2014]

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