General C++ Programming - November 2013 (Page 15)

by lekha
counting and summing the elements
 
Write a program in C/C++ that counts and summing the elements (numbers) from the given interval in the array. please help me to write code for this question ...
[3 replies] Last: Looks fine, apart from the typo on the first line inside the for loop.... (by MrHutch)
how to fix the snytax error: identifier 'column'
 
this is my code #include<stdio.h> void main() { int player=0; int winner=0; int choice=0; int row=0; int column=0; int line=0; char boar...
[3 replies] Last: @MikeyBoy - the line where he assigns (if code tags were used I could... (by ajh32)
Calculator program (with pointers) problem
 
Here is my program. #include <iostream> using namespace std; int Add (*x , *y) { int a=*x; int b=*y; int c=a+b; return (&c); } int Sub (*x , *y) { in...
[2 replies] Last: No. I have made stupid mistakes. I'll check this more thoroughly soon ... (by Silver Falcon)
Shorting 2 corresponding arrays? Please help
 
Hey guys im trying sort my Calorie array and day array corresponding to each other but i have no idea how to start i cant grasp the concept for some reason. ...
[1 reply] : First I would suggest that you hold both the day number and calories f... (by ajh32)
whats wrong with this code: employees salary recording
 
#include <iostream> using namespace std; const int MAX =100; class Details { private: int salary; float roll; public: ...
[4 replies] Last: thanks it works perfectly (by bimmybell)
How to create and use DLL's
 
I'm trying to find out how to create and use DLL's in eclipse. I know general C++, library but i cannot figure out DLL's. p.s. I've posted on this topic b...
[1 reply] : To make a DLL, you need to use the <windows.h> library (hence, this sh... (by TwilightSpectre)
Turning a limited Float Into Another Float
 
Hello. I know in C++ I can do the folowing: float var1 ; var1 = 9.12345 ; printf("%.2f",var1) ; the output will be 9.12. What if I wanted to save that...
[1 reply] : Your question is a little bit unclear but I believe you are asking ho... (by jmadsen)
How can I explain this while-loop?
 
I have an C++ source code and I have to convert it into C#. But in C++, there's a strange while loop that I can not understand. while(m_get(&mr,&ml,&mx,&my)...
[2 replies] Last: Thank you long double main! I'll try this. (by Hung Nguyen Danh)
Power Function Problems
 
I need to get a function that produces 0 1 1 2 2 4 3 8 4 16 5 32 6 64 7 128 8 256 This is what I have so far. ...
[2 replies] Last: What a boss. Thanks! (by Tysonw123)
by LB
Use PImpl with custom stream: is my solution optimal?
 
http://ideone.com/RKf3uC #include <iostream> #include <string> #include <memory> struct Other { virtual void print() = 0; virtual ~Other() = default; ...
[5 replies] Last: That's not a limitation, that's a drawback. For a second I thought thi... (by LB)
Binary Program
 
I am looking to eliminate the leading zeroes of the input. The format has to stay the same and output must be as hinted in formatting. So how would I go about d...
[2 replies] Last: Thanks. (by Tysonw123)
Windows vs Linux
 
Do I need to know about the OS I am programming for? If I want to program for Windows in C++ should I know more about Windows? If I want to program in Linux usi...
[19 replies] Last: Just get used to forward slashes in general, I don't think it matters ... (by closed account N36fSL3A)
Turning the Digits of an Integer into Array Elements
 
Hello. I have an integer that the user enters. I need each digit of the integer to be set as an element of an array. the integer could also be entered as an arr...
[5 replies] Last: I don't understand why you can't just use cin.getline() ... (by Duthomhas)
i am need help
 
I am constructing a program that randomly determines whom the user should send a text message to. Allow the user to enter five friends that will be used for th...
[3 replies] Last: The user always enters 5 friends, right? So use for (int counter = 0;... (by closed account DEUX92yv)
What am I supposed to do?
 
My professor gave this function to us: Given a function factorial as follows: int power(int exponent) { int i, result=1; for(i=1;i<=exponent; i++) ...
[7 replies] Last: Yes that is right! Thanks for help! Do you guys think you can help my ... (by brownjas)
decrpytion homework
 
Hi, for some reason my code is not couting right. My function is supposed to decipher some code that if it has multiple same chars then it drops one. Example aa...
[3 replies] Last: Strings actually have a pretty nifty resize function that you might fi... (by Albatross)
Doubt in create Menu of options in the horizontal
 
Hello Everyone. I need create menu of options in the Horizontal using class. My main class : #include <iostream> #include <string> #include <conio2....
[no replies]
String and get length problem
 
Hi everyone, I'm trying some codes about string arrays and taking array length. But i have some problems. I can't get length of string and can't send to a fu...
[2 replies] Last: thanks for reply but it didn't work, i tried it. (by CyBeRCyBeR)
Need help making Binary Search Tree Movie Program work.
 
I am working on a project right now that is meant to act as a small movie database. The binary search tree is meant to read info from this file: http://www2.c...
[1 reply] : Hey, I'm also working on binary trees. You should look into what kin... (by mattballj10)
Lookup tables vs cache
 
As one for wanting to understand how things actually work underneath , I propose the question to those who possess higher level knowledge and can explain to thi...
[1 reply] : The FPU typically has instructions to compute sine, cosine, and tangen... (by Duthomhas)
November 2013 Pages: 1... 1314151617... 46
  Archived months: [oct2013] [dec2013]

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