Beginners - June 2010 (Page 7)

my program, new to C++, give me ur thoughts please :)
 
its nothing great, ive just started programing in C++ this year. I do have a back round of java so it did help a little... anyways heres my program. its not ver...
[2 replies] Last: I thought i should have done that, but wasnt too sure. Thanks :) (by sighter)
Operator Overloading Failure
 
Currently my program is compiling, but it shuts down after that. What I am trying to accomplish is to compare two classes items to determine if they are the sam...
[3 replies] Last: Well the whole point is that you define what the operator does. The g... (by Disch)
Getting text from a texbox
 
http://img689.imageshack.us/img689/3931/form1steamsender.png How can I get the button to take the text that is input into the textbox, then when I push the b...
[2 replies] Last: I'm not trying toi alter anything..I just want when I click the button... (by C to the UNIT)
Initializing a multidimensional array
 
What is the recommended way to initialize a multidimensional array? Someone commented that the following is "not optimal". for(int i = 0; i < rows; i++) ...
[3 replies] Last: They are equivalent regardless of size, as long as the 2d array is not... (by jsmith)
by Soaps
Using an iterator in a for loop
 
Hey guys, just running into a small problem, and not sure if what I am attempting is possible, but I don't see why it wouldn't be. I am just delving into STL co...
[7 replies] Last: Alright Galik, that all makes sense. I did know the reference to vecto... (by Soaps)
pointer problems...
 
I am creating a linked list of int values. I cannot figure out why the function below doesn't find values that are in the list. //at function returns the in...
[2 replies] Last: What good would returning an integer index do, anyway. Wouldn't it ma... (by Disch)
DEV C++ giving warning
 
when i run dev C++, it shows the following warning: "there doesn't seem to be GNU make file in PATH or in Dev-C++'s Bin p[ath.Please make sure that you have ...
[2 replies] Last: Make exists for Windows too (MinGW = Minimalist GNU for Windows). Jus... (by Athar)
Size / Length of primary array
 
Hi there. Actually a Java programmer I am dealing with C++ again. Haven't done so in 15 years, so please be a little easy on me when I start off with the pro...
[7 replies] Last: [quote=CPPNewbie]I was missing the fact that Galik's code isn't actual... (by Galik)
Libraries
 
Can anyone explain (very indepth) of what Libraries are, how they are used, and examples of different instances you would use a certain library
[8 replies] Last: Oh ok then now I understand (by C to the UNIT)
by vkaul1
cannot deduce template arguments
 
I was using stl maps for the first time and iterator to go along with them. Compiling in VC++ 6 I get following errors which I can't seem to solve at all. Any ...
[7 replies] Last: So typedef std::map<int,int>::iterator Iter; for( Iter outer ... (by jsmith)
Questions about my Bracketing Search Solution
 
This is my response to the four star difficulty version of the Bracketing Search problem described here: http://www.cplusplus.com/forum/articles/12974/ /* As...
[3 replies] Last: Sort of. Read my reply again. It implies that you need to keep track... (by jsmith)
Search in a File
 
Hi, I'm new to C++ programming. I'm working with a File. It contains different Operators with value and Error for each of them. I want to write a code th...
[2 replies] Last: [quote=kempofighter]Please post the contents of the file. (by moorecm)
Dev c++ error
 
I keep having an error in Dev C++ (build error 126) codes are perfect just it wont run anything. I have reinstalled it several times, and that seemed to work ...
[3 replies] Last: it isnt the code coz every single program i make dosnt work ang gives ... (by Asakura)
gcc/g++ is not type casting in if()- Problem
 
#include<stdio.h> int main() { double a=2.1; float b=2.1; if(a==b) printf("hh"); return 0; } Why is program not going in the if con...
[1 reply] : http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17 (by R0mai)
About message passing
 
As I understand it, message passing in OOP is just calling an object's method. Say you have a spaceship object and you call its move method to take it to anothe...
[1 reply] : Objects can contain sub-objects. So the object's methods (member funct... (by Galik)
How to check for prime number
 
Hi I am doing this exercise from a book, and I need to be able to identify a prime number. According to the rules, a number is prime number if its odd and th...
[1 reply] : your problem is the while loop. while(positive_integer_new%number!=0)... (by hamsterman)
getting a program to accept input whether or not text is typed directly in cmd
 
hey im pretty new at programming and idk if this is obvious, but im creating a program that is really just for me inputting data from the internet, but when im ...
[no replies]
by samb96
why won't this assign a string to ch?
 
/* chCase Version2 */ #include <iostream> #include <cstdio> using namespace std; int main() { char ch ; int i; while(true) { ...
[3 replies] Last: Try this instead. if(i == strlen(ch) - 1) cout << "the new letters ar... (by spaggy)
separating individual digits from an integer
 
hi.. Can someone help me.. I am trying to improve my C++. It is so bad.I cant even do this. I need to read an integer and then separate them into individu...
[10 replies] Last: This one is smaller... int main() { int enter_num, temp_num,... (by mgupta)
Read byte from JPEG file??
 
Please advise me how to read the JPEG file into byte array. I was trying to use ifstream and ios::binary as following: #include <fstream> #include <iostream...
[5 replies] Last: This should work: std::ifstream ifs("butterfly.jpeg", std::ios::in |... (by Galik)
June 2010 Pages: 1... 56789... 26
  Archived months: [may2010] [jul2010]

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