Beginners - June 2012 (Page 33)

if there any difference between this two?
 
If there any difference in the answer if we place and external parenthensis? or 1 and 2 are the same? 1 - (bla > bla) && (bla < bla) 2 - ((bla > ...
[2 replies] Last: Not really, it was just to make sure about the syntax.. Thank your ... (by scout51)
Operator "Not equal to"
 
Just to get this concept straight... The expresion !(x > 10), is equivalent to (x < 10) ? or the expresion means that, if !(x >10) , can be (X <= 10) ? ...
[4 replies] Last: Thank you for your help guys, it really helped a lot. (by scout51)
by uhh
Help with converting decimal to corresponding integer.
 
Hello. I am new to C++ and need a little bit of help. Question: Write a program that prompts the user to input a decimal number. The program should outp...
[12 replies] Last: What I showed you is how to convert an int to binary. I also told you ... (by ResidentBiscuit)
by Smyris
error reading sequential file values to an array
 
I've been tasked with making a log in program but I keep getting an error whenever I try to read in a value to an array. To be more specific I'm trying to read...
[2 replies] Last: Thanks! it works much better now (by Smyris)
How do I make CMD apps read letters individually on one line of text!
 
Please HELP, I'm making an app that takes random letters like, "K jcxg k ecv.", and translates them into words like, "I have a cat." Can anyone help me a...
[13 replies] Last: I tried that but it keeps saying 'encrypt': identifier not found (by RandomStuff)
What is the value of sum? and why?
 
sum = 0 num = 10 if (num > 5) sum = sum + 10; else if (num = 10) sum = num = 15; sum = sum + num answers: a= 0 b= 20 c= 10 d= 25 ...
[6 replies] Last: Thanks guys for your help...and no...I wasn't in the middle of a test ... (by scout51)
Inheritance/Polymorphism
 
Hey i'm trying to figure out inheritance/polymorphism and i'm a bit confused Given the following code: class Item { public: void display(); protected: ...
[4 replies] Last: You have access to all three if you take advantage of polymorphism and... (by CJC0117)
Switch problem in C++
 
Hello. I wrote this program. #include <iostream> #include <stdio.h> #include <string> using std :: cout; using std :: endl; using namespace std; ...
[1 reply] : cout uses << cin uses >> Also, you do not need to declare: using std... (by Volatile Pulse)
operators
 
Hi, The error I am gettling is: no match for 'operator<<' in 'n2<<std::endl' //... int main() { Average n1(5); //holds a number Average ...
[1 reply] : std::ostream::operator << () doesn't know how to handle your Averag... (by closed account zb0S216C)
Help with my application's user defined configuration
 
I am currently writing code for my application's user defined configuration. The "WriteConfiguration()" function takes two arguments; The setting to be chang...
[12 replies] Last: I do know there is a difference between the release bins and the debug... (by Volatile Pulse)
error C2871: 'std': a namespace ... does not exist
 
error C2871: 'std' : a namespace with this name does not exist /* #include <cstdlib> //added http://forums.devx.com/showthread.php?t=152439 #include <stri...
[5 replies] Last: the errors gone, I moved #include "stdafx.h" to the top and closed VS ... (by forestPeterson)
error LNK1561
 
error LNK1561: entry point must be defined #include <iostream> #include <string> #include "genlib.h" #include "simpio.h" #include "set.h" #include ...
[2 replies] Last: that was it, fixed (by forestPeterson)
Overloaded +=
 
Say if i wanted to convert the following function to an overlaoded +=: void addvec(vector<int>& v1, vector<int>& v2) { if (v1.size() > v2.size()) v2.resiz...
[3 replies] Last: Might want to have a look at this line: v1.resize(v1.size()); And th... (by Athar)
Where can I find preprocessor directives?
 
I am working with some code that was designed to be used on Windows and Linux. There is a preprocessor condition that checks to see if the variable MYSQL_DATABA...
[3 replies] Last: No problem :) (by Torin)
Moving bits to alter characters (1,2)
 
Right I've got this encryptor program but I've just thought of a much better encryption method (edficency and safety wise for the program), the down side is Im ...
[24 replies] Last: The problem with "encryption" is that you want to eventually reverse i... (by Texan40)
by LilKB
Getting some crazy output... can't figure out the reason.
 
So I'm working on a program for class, and everything compiles correctly, yet my output is not what it needs to be. The program is supposed to output a list of ...
[2 replies] Last: Thanks for the help, As we both thought, the file wasn't being opened.... (by LilKB)
error C2628: '<unnamed-tag>' followed by 'bool' is illegal (did you forget a ';'?)
 
I am rewriting a program that was originally written using a helper class called genlib.h - described here http://www.keithschwarz.com/cs106l/winter20072008/han...
[4 replies] Last: you are correct - I found a newer library on sourceforge (by forestPeterson)
Value is x10 for no reason
 
I recently made a tiny program to test a mathematical algorithm, but i'm getting some output I can't explain. I think I must have changed a setting or something...
[3 replies] Last: The new-line escape character constant is the more efficient choice si... (by closed account zb0S216C)
I need some help. I cant figure this simple command out.
 
All i need to do is have my program end at any point by pressing CTRL-c and I can't figure it out can someone please help me
[3 replies] Last: its not closing it. i need code (by atown282)
cin
 
Am i correct in saying that you can only use cin when inputting from a key board. as in when you say: cin >> x; you are essentially calling the in...
[5 replies] Last: Ok thanks. (by Ramzi89)
June 2012 Pages: 1... 3132333435... 51
  Archived months: [may2012] [jul2012]

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