General C++ Programming - March 2016

My if statement is ignored.
 
cout<<endl<<endl<<"Is your number here?"; cin>>card_choice; if ((card_choice = 'y') && (oddcheck == true)) { j = 0; for(int i=1;i<64;i++) { ...
[no replies]
Calling function that PaintEventArgs and other parameters C++?
 
Hi Everyone, I have the following code... Private: System::Void formPaint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e, int intValue){ ...
[2 replies] Last: Cool thanks Thomas1965! :) (by shorty5161)
deck of cards in structs
 
hi all, i want to create a struct with the deck of card in it however I don't know how I would do it since I'm trying to make both face and suits an int value a...
[2 replies] Last: I would organize it like that: enum Suit { Spades, Clubs, Hear... (by Thomas1965)
If I replace srand()/rand() with srandom()/random(), is RAND_MAX is still there?
 
or I need to change to use something like RANDOM_MAX? which version of generating the random number is more portable? Cause I encountered using srand()/rand(...
[1 reply] : rand() is a standard C function http://en.cppreference.com/w/c/numeric... (by Cubbi)
Operator Overload
 
#include <iostream> #include <stdlib.h> #include <string.h> #include <iomanip> using namespace std; int main () { string s1; string s2; int n; while...
[no replies]
Implement Converter & calculator
 
Hello , I need your help to orginise my work . Well am going to code a simple program , Functions : 1 - Convert from DEC to BIN (using STACK) & save a res...
[2 replies] Last: ??? (by infocrasher)
Progam Help
 
A C++ program that determines exactly how many hours have passed since a previous historical event happened. for example if the user enterd the hour and date of...
[2 replies] Last: just need help with catching the leap years and months that have diffe... (by gamichael123)
What is the difference between a library and a framework?
 
Hey guys.... What is the difference between a library and a framework? Is a library is a bunch of predefined codes that run during the execution of the prog...
[3 replies] Last: OK.Thanks (by omer123)
Progam Help
 
How write a program that will determine the resistance value (in Ohms or kOhms)of a carbon or metal film resistor (ranging from 1/8 to 5 watts) when the progr...
[4 replies] Last: http://www.cplusplus.com/forum/general/187977/ (by chicofeo)
Reading segments from text file
 
I have a text file containing: int Bob, 2you, john, AdamSmith; float taxYear=2013, taxRate=29.2.3; And I need to read it in a way where I analyze: int B...
[7 replies] Last: Your problem is with the parsing. The , and ; are special characters s... (by Thomas1965)
File input / output binary
 
Hey guys, I'm having some really hard trouble figuring this out. I'm making a program that allows me to store a structure of records in a file, I pretty much ha...
[3 replies] Last: It looks like the file can store more than one object but the code to ... (by dhayden)
Inverse Permutation
 
Hi, I have been given a task to take a permutation of an alphabet string and return the inverse permutation of it. For example if the character B is in po...
[1 reply] : For example if the character B is in position 3 in the input permutat... (by Moschops)
Create interest program, and set a table.
 
Using a given interest rate, balance, and term output a table of adjusted balances each year for the number of years specified by the term. For this assignment ...
[1 reply] : Please use code format tags (in the palette on the right) to format yo... (by kbw)
rock paper scissors using functions with extra features
 
Hello i am trying to write a rock paper scissors program using functions with some extra added features Here is the sample output what i am thinking off. Ro...
[1 reply] : Why don't you do a little search here on the forum? There are plenty o... (by Thomas1965)
Doubly Linked List Back Pointer
 
I have to implement this doubly linked list. The list needs a front pointer pointing to the first valid element and a back pointer pointing to the last valid el...
[1 reply] : It depends on what you've used DList::m_back. I would have thought th... (by kbw)
bell character in array - control character
 
Hi, Here is my code char arr ={'\0'}; arr = 0x01; //value ok 01 in the array arr = 0x07; // value is bell character i.e. \a ...
[2 replies] Last: I need to send the command to the printer which is like some hexadecim... (by anmol2701)
Creating an array with random letters
 
i have created this program but getting random numbers how do i get random letters instead of numbers. #include "stdafx.h" #include <iostream> #include <cmath...
[6 replies] Last: char A ; for (int r = 0; r<N; r++) for (int c =... (by Chervil)
First class program, how to implement design ideas?
 
I'm now learning about classes, and after doing this exercise, which has one class using another class, I thought I would build the program up with more options...
[1 reply] : Now, I thought it might be a good idea that instead of outlining all t... (by nostromo)
Creating a register; Fruit Stand Program
 
You are running a roadside fruit stand where you sell Apples, Bananas, Oranges, and Pears. You are to create a program that calculates the total cost of a cu...
[3 replies] Last: Hi, Please use code tags: http://www.cplusplus.com/articles/z13hAqkS... (by TheIdeasMan)
PathFileExists always returning FALSE
 
Hello, I'm having trouble with a bit of code. Here it is: LPCWSTR path = (L"C:\\windows\\system32\\hal.dll"); if (PathFileExists(path) == TRUE) { Mess...
[4 replies] Last: hmm... Ok, I'll try these and see if it will work. Thx. Update: Yep, i... (by closed account NUCkSL3A)
March 2016 Pages: 123... 23
  Archived months: [feb2016] [apr2016]

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