Beginners - April 2014 (Page 29)

Help keeping consistent variables
 
I need to do a problem where i input id, hours worked, pay rate, and age. At the end i need to print id of an employee with the highest pay. I understand how to...
[5 replies] Last: Line 14: Should be oldage, not age. age will give you the age of the... (by AbstractionAnon)
Matrix Product
 
Hi guys. I'm trying to calculate the Matrix product which is the sum of the products of elements from both matrices. When i use the code below i get the eleme...
[1 reply] : Hi, Try moving line 7 out side the loops, at the moment the answer wi... (by TheIdeasMan)
Wrong output in Sudoku Solver?
 
Hi! I'm trying to make an NxN sudoku solver. I haven't finished the code yet. So far, it should be printing the solved sudoku when the board is blank. Also, I'm...
[7 replies] Last: Shouldn't you iterate the whole board like you do on lines 77 & 78? Lo... (by TheIdeasMan)
Random Number Generation
 
I have a function that generates a random number int randomNumber(int l, int u) { int x; //get random number between l and u---------- unsigned seed = ch...
[3 replies] Last: You only need the seed to be different each time you run the program b... (by Peter87)
Pointers, need opinions
 
Hi guys~ so i got this assignment that wants me to create a program using File I/O and Pointers so me & my friend have created this exam results program..File...
[no replies]
declare class
 
what is declared code in C++ classA~::classA()
[2 replies] Last: Thanks so much :D (by nguyentuandang)
Creating a simple 'hello world' and linking it together with 2 pre-compiled objects
 
In my created project I got "IGEL1.OBJ" and "IGEL2.OBJ" as well as "IGEL.H". In Orwell Dev-C++ I take the following steps: 1. 'File'->'New'->'Proje...
[2 replies] Last: You can also make the .obj files into library files! Just use the comm... (by ultifinitus)
Why is my console doing this???
 
this is a copy of what the console outputs below. why is it outputting this random stuff at the end? (-1929314651 2685740) Ho...
[5 replies] Last: Your code is gone, so that makes it difficult for others to comment. ... (by TheIdeasMan)
Inheritance?
 
Hi! I'm very new to inheritance and for a task that seems so simple, I'm having so much trouble figuring out how to go about this! My assignment is to have the ...
[11 replies] Last: Did the instructions say to have the classes setup like that though? ... (by giblit)
Need Help With Private/Public Class
 
Ok so I am making a class "Box" with private variables and I have made public member functions to be able to populate the private variables right? So my questio...
[7 replies] Last: Ok, still no need for set functions: Get the info, make a car object w... (by TheIdeasMan)
suffixes
 
Can someone explain the suffixes alittle vetter to me? I read the tutorial on the site of constants that includes suffixes and it just conpletely confusrd me I ...
[4 replies] Last: Yessir you still have to declare what it is (generally, not including ... (by ultifinitus)
Converting a std::wstring to int...
 
Hello, I presume this to be very simple but I cannot get it to work. I am simply trying to convert a std::wstring to an int. I have tried two methods so far....
[4 replies] Last: Thank you very much for the example, I definitely tried to search but ... (by ckoeber)
Help with insert function with nodes
 
In this program I am attempting to create a function called "insert" which takes in a node and a value. The function is supposed to insert it into a position wi...
[13 replies] Last: Hi Pepstein, Marissa here. How are you are calling insert() in the mai... (by closed account S3TkoG1T)
by Arcie
Having issues with file verification loop
 
So, when I run this, it verifies the file correctly the first time. If I type 'bob.txt' it does the following stuff which I omitted here for simplicity. If I ty...
[1 reply] : I figured it out!!! I AM SO PROUD OF ME!!! Sorry for the caps sentence... (by Arcie)
C++ dynamic array
 
So i have this class i am doing this code for where i have to stick the data from a outside source into a dynamic array but when i excute it and when i enter th...
[1 reply] : This is homework? If the reply is no, use a vector instead. www.cplusp... (by iQChange)
by Irhcsa
Can't send programs to people.
 
I'm trying to send a game I made to my wife's computer and a friends computer. It runs perfect on mine and my other friend who has visual basic 2013 express. ...
[1 reply] : Nevermind. After ALOT of messing around and changing stuff I figured i... (by Irhcsa)
Non-Recursive gray code
 
I have to write a program that needs to print out gray code based on the amount of columns the user wants. For example if they choose three, I have 8 rows with ...
[1 reply] : This is what I have so far. It only prints out 0. #include <iostream... (by kbsmith48)
Clearing cin's buffer
 
Since this is a newbie question (though I am not a newb), I am posting this here. I have tried: cin.rdbuf()->in_avail(); Upon further inspection of the sour...
[5 replies] Last: @ SorinAlex While that does clear cin's buffer, that's not what I was... (by IWishIKnew)
Help aligning
 
Values seem to get messy after -2, I don't understand why. // computer y in terms of x // from -4 until 3 #include <iostream> # include <cmath> ...
[7 replies] Last: Great! Thank you very much! (by Zenith1900)
Lost in base conversion.
 
I've just started doing C++, I had no idea it was a part of my course, so it's an absolute overload. I'm currently doing a practice exam question where I hav...
[4 replies] Last: @chervil ... thank u for your reply ..ofcourse I do respect your choic... (by dero)
April 2014 Pages: 1... 2728293031... 67
  Archived months: [mar2014] [may2014]

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