Beginners - September 2011 (Page 31)

two dumb questions about overloading operators
 
My questions are about the following wikipedia page. http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B Please see the section of "Arithmetic operators"....
[5 replies] Last: Yes. If you don't provide your own assignment operator, the compiler ... (by Disch)
question about using class
 
Hi.. I would like to ask if my code is correct? It compiles fine.. but when I look at other codes, theirs codes are much longer...especially in the public par...
[2 replies] Last: AKat (9) Sep 13, 2011 at 12:19pm That's the constructor that they be... (by sleet65)
Coolest thing you've ever done in console?
 
What is the coolest thing you've done with console programming?
[8 replies] Last: I finally learned how to to create scrolling text, without using left$... (by whitenite1)
by Gldnbr
Converting DEC to BCD
 
I have to convert a decimal number (1-255) to packed binary-coded decimal. I have the idea of how it's supposed to work. Example: Convert 133 to BCD 1. Separa...
[1 reply] : You can get last number from bigger number by %-operator. For example ... (by eraggo)
by ty98
thread
 
I can't finde out how to get my program to attach a thread to a dll file. do you have eny ideas?
[3 replies] Last: I don't understand what you're saying. Your post isn't descriptive eno... (by closed account zb0S216C)
Need help with c++ concept
 
ok so we are learning I/O with files. One input file is Data.txt and it contains this: Robby Tono 5 15 Tim Con 2 13.5 Bella Quint 10 5 and once the output fil...
[5 replies] Last: :) Why was that so funny, Mathhead? Wazzak (by closed account zb0S216C)
What's wrong with this?
 
I'm getting some errors in the following function: [code Here are the errors: What's wrong here? I can post more information if I need to. Thank you. ...
[5 replies] Last: FWIW, you should have been able to diagnose that on your own. One of ... (by Disch)
Console SendKey issue.
 
So, I have this code: #include <cstdlib> #include <iostream> #include <windows.h> #include <stdio.h> void SendKey (char Vk) { char VkKey = VkKeyScan(Vk); ke...
[2 replies] Last: Thank you for the quick answer! That worked like a charm! Thank you ag... (by brreakerr)
rounding and input validation
 
2kgs or less -- rate per 500 miles shipped = $1.10 upto or 6kg -- rate per 500 miles shipped = $1.10 upto or 10kg-- rate per 500 miles shipped = $1.10 upto 2...
[1 reply] : // Hasnain Attarwala // Lab3 problem 13 // Page 222 // fa... (by Hasnain Attarwala)
by maani
Arrays
 
can anyone please tell me how to compare elements in an array? for example, i have {2, 3, 5, 2} and i want to compare if any of these four elements are equal o...
[8 replies] Last: Since C++ is a more advanced language with more things in it, it is ve... (by kong288)
Help External Link Error
 
I am using Microsoft Visual C++ Studio 2010 as my ide and compiler. Its giving me the following error codes and my code is posted below for reference. The progr...
[4 replies] Last: Still nothing.....listed below is the updated error message with no ch... (by thoythoy)
Manipulating struct members with functions
 
Let's say I have the following struct: struct foo { int a; int b; }; Now let's say I want to manipulate a and b. I could write the following functi...
[6 replies] Last: Maybe your could do something similar to this: void Bar( foo *, int... (by closed account zb0S216C)
what is the use of function pointer?
 
Plz help me m getting this question in all interview What is the use of function pointer? My ans: Function pointer is replacement of swit...
[15 replies] Last: I could pretend that I was busy, but I was actually just taking a brea... (by hanst99)
Doppler shift and if else
 
I am suppose to write a program that calculates speeding tickets for a c++ class. Below is what the assignment is and what I have so far. Lab 5 (Chapter 3 Ma...
[1 reply] : In C++ the data type 'int' is an abbreviation of the word 'integer', a... (by zippyking)
by tonnot
How to cast a vector of struct to a vector of 'base' struct
 
I have : struct A { int value1; int value2; } struct B : A { int value3; int value4; } I have vector<B> my_vector; and a function that rece...
[3 replies] Last: Yes, it's impossible. http://www2.research.att.com/~bs/bs_faq2.html#c... (by hanst99)
by Mil
help request - regarding keywords for a text based game
 
I'd like to start off by saying I was hesitant to post and will not request help coding or debugging directly because I realize a language is best learned throu...
[3 replies] Last: Another option would be to use a std::map<std::string, Room&> inside... (by hanst99)
Please Help Me Understand
 
My assignment is to write a program that estimates the value of the mathematical constant e by using the formula e = 1 + 1/1! + 1/2! + 1/3! +... I asked for ...
[10 replies] Last: Thank you so much. I didn't want to just except the answer and not un... (by lbgladson)
No defines?
 
I'm told that defines are to be avoided in general. Why would the following be inappropriate? //#define DEBUG #ifdef DEBUG cout << "..." << endl; #e...
[2 replies] Last: This whole "no define" stuff is basically mostly directed at practices... (by hanst99)
Continue on enter, but accept string value
 
The code is a bit long, but I basically just need something that will allow my code to continue on as normal if you hit enter (like cin.get() would do), but a...
[2 replies] Last: getline() did exactly what I needed, thank you very much! :D... (by wanabeswordsman)
pseudocode for class and ordered list
 
Could somone help me to create a pseudocode for a class that track last name, firstname, age and job level and then orders them accordinc to this order: lastnam...
[no replies]
September 2011 Pages: 1... 2930313233... 48
  Archived months: [aug2011] [oct2011]

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