General C++ Programming - March 2014 (Page 3)

How to overload >> operator?
 
Hey guys, I've been working on this assignment where I have to implement a class Matrix in which I have to take input from user by overloading >> operator. The ...
[4 replies] Last: Strange! Then there must be an issue with my compiler. Let me build ag... (by DaniAlves)
Stacks without class - URGENT help needed (1,2)
 
Hello, i put up a post a while ago about stacks, and im yet still to grasp the concept and after googling for hours on end cannot seem to find an answer, so i t...
[21 replies] Last: oh my! thank you, i was using MS until my student copy messed up, now ... (by connor grimes)
by erinda
c++
 
please help me to create a program that trigonometric series ∑(k-3)sin(π/k-3) with k = 4 until 13..
[1 reply] : We'd be more willing to help if you'd show us what you've attempted so... (by Daleth)
How will I loop this without losing the values of the variables?
 
I am a beginner when it comes to c++ programming please bear with me. I know that returning to main() is not a good idea and if anyone of you know how will I...
[1 reply] : For loops, look at "control structures": http://www.cplusplus.com/doc/... (by Daleth)
by CRooky
output function dilemma...
 
#include <iostream> using namespace std; // ConvertTemperature.cpp int main() { // prototype double convertTemperature(double); // function ...
[2 replies] Last: the second page you sent me was very useful thank you Daleth,...C++ ju... (by CRooky)
by CRooky
output function problem
 
#include <iostream> using namespace std; // CalculateMaximum.cpp int main() { // prototype int findMax(int, int); // the function declaration ...
[3 replies] Last: You could use an if-else anyway; the function procedure finishes when... (by eyenrique)
by CRooky
More output functions; still just not understanding...
 
#include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> using namespace std; // PrintThis.cpp /* Sample Output 5106 1607...
[4 replies] Last: awesome...! I have more I'll post with my attempts.. (by CRooky)
by CRooky
Output Function ? Who can get me started? /:
 
#include <iostream> #include <iomanip> using namespace std; // PrintSquaresAndCubes.cpp /* Sample Output NUMBER SQUARE CUBE ------ ------ ---...
[9 replies] Last: Yes. X is the number being passed to the function: printSquaresAnd... (by giblit)
Outputing
 
SO lets say I have a file that says 10 tennent 9 Eccleston 12 Capaldi 11 Smith How do I get the number's in order but not changing the name it goes wi...
[12 replies] Last: There it is. #include <iostream> //cout - main #include <string> //s... (by iQChange)
Copying two unsigned char[] into unsigned char[]
 
unsigned char key ; 139 unsigned char rfseed ; 173 f = fopen("/dev/urandom","rb"); 174 fr...
[2 replies] Last: I am not sure, I found a solution that might be temporary, but strings... (by knowNothing)
Calculating sum of the square of numbers between two inputs
 
This is the question: Write a function which takes two parameter of integer type and both parameters are positive integer. These number should be provided b...
[2 replies] Last: You can use a loop to shorten your code #include <iostream> using n... (by Chriscpp)
Problem with switching function prototype to another type
 
Hello, I have a question about strings and switching them to arrays. This is my code: #include<iostream> #include<string> using namespace std; int bin2dec(co...
[7 replies] Last: So you are still having problems? You can either 1) read into a char a... (by giblit)
my snake game program is not working.. Please Help!
 
ok my snake game program compiles, but doesn't show the snake or the apples. i dont understand whats wrong here is the code. i use codeblocks. #includ...
[no replies]
Problems with my structure code?
 
For some reason the only output that I'm getting is the following: http://imgur.com/2jrXCem Does anyone have any idea why? I just learned structures a few days...
[3 replies] Last: thanks for the help! i made some stupid mistakes and was able to fix t... (by RyanR1211)
Multiply two dynamic arrays
 
By using operator overloads i need to be able to * two dynamic arrays; this is what i have so far MyInt operator* (const MyInt& x, const MyInt& y) { MyInt T...
[7 replies] Last: Thank you both! NT3 explanation helped me visualize it better, also LB... (by bodyguard814)
Structure In Binary File I/O
 
Hello, I'm trying to insert a structure into a binary file, then read it back out into a "temporary" structure and output some values. #include <iostream>...
[12 replies] Last: Depends on how you want to do it. Here's an example (Not based off of... (by closed account N36fSL3A)
What is wrong with my source code (HANDLE)
 
Okay, I made a program which hides the annoying blinking cursor, but it's not working correctly... the cursor is still there. I tried with Visual Studio and De...
[2 replies] Last: So, that's what was missing GetConsoleCursorInfo. Thank you. (by soulblazer)
Bit masking
 
I am having trouble creating a bit mask, the whole concept is not really sticking with me. This program stores multiple numbers into a single variable and then ...
[no replies]
by y510
help with my code results are off for this array or string function
 
The task that i am in need to do is write a program to encrypt and decrypt message. The following is the encrypt mechanism: Each character in the message w...
[1 reply] : Please anyone help? (by y510)
Functor
 
How would i write a functor for this code. The code is written to read data from a file and store in a multimap. The data has numbered lines. eg:1 This is a s...
[4 replies] Last: Thanks kbw. (by generic2709)
March 2014 Pages: 12345... 36
  Archived months: [feb2014] [apr2014]

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