Beginners - September 2011 (Page 18)

LOWEST SCORE DROP
 
I am beginning c++ trying to debug program to average the HIGHEST 4 out of 5 test scores. I CAN'T use arrays. Here is my code. It will NOT compile. PLEASE HELP ...
[5 replies] Last: Much more concise way of doing the same thing. #include<iostream> #... (by xkcd83)
by VGCM63
Once again, Y/N?
 
Hello to all, How do I avoid the enter after either Yes or No? I am using cin in C++ but is there another way to avoid having to use the enter after the Y o...
[8 replies] Last: I was just being a smartass :) (by ascii)
Moving contents of an array to another array
 
Hi everyone, I am basically going to be picking apart a c-string that contains words and putting ONLY the unique words in a 2D array of char, in such way that ...
[3 replies] Last: i tried strcpy () but when i printed out twoDarray it had nothing in... (by coolbran)
Frequency (1,2)
 
What is the best method to get the frequency of words in a file? I have this so far, however it only grabs the first word in the file and checks it with itself...
[30 replies] Last: There were a few bugs, a missing break statement and some flow control... (by Computergeek01)
Code is not functioning. PLEASE HELP!!!
 
Basically, I think i did my code right, but is not executing correctly. I'm not sure if it's the firstchar and secondchar not correctly put in or the nested ifs...
[no replies]
by millsy
C++ adding problem
 
Okay this is a little to tricky for me, Some how i have to use only the numbers 1-9 to add to 100... here are the rules, you can us the numbers that are side by...
[no replies]
object pointer problem
 
hi why won't this work? i'm able to make object but not object2 #include <iostream> #include <stdio.h> #include "../header_files/ob.h" Ob::Ob() { ...
[3 replies] Last: hi, the error message was "ob.cpp:22:9: error: cannot convert ‘Ob (... (by olifant)
SFML problems
 
I think after including SFML i screwed up Code Blocks. The program i am running doesn't even use SFML, only console. After i click build, it says that i haven't...
[no replies]
Problem with brain
 
Sup. We're learning about structs/classes now, and since I missed the lecture I'm seriously confused, tried reading up on them from the internet and I think I h...
[2 replies] Last: Hey man, thanks that was a great help. I've read about references but ... (by stridexr)
error in For loop in a novice matrix
 
Why won't this run!? #include <iostream> using namespace std; int main () { int num; cout << "enter a number between 1-10\n"; ...
[3 replies] Last: you.are.the.man. thankyou (by soundman7085)
sdss
 
sdsd
[11 replies] Last: I meant that what he wanted to do doesn't work... of course if he di... (by hanst99)
by erikn
avoiding overwrite with user input?
 
another i'm sure easy question. here, as an exercise, i made a simple case-reverser and i'm trying to figure out how to impose limits on user input so no overw...
[3 replies] Last: Why not use a string variable instead of a char . It worries me that y... (by xkcd83)
I dont even know where to begin...
 
Any input would be greatly apprciate The Woody furniture company sells the following three styles of chairs: Style Price Per Chair American Colonial $ ...
[4 replies] Last: Yes, that's why I said you need to review your notes. There is a point... (by hanst99)
Change Counter Works for Some Decimals Not Others
 
So I am trying to code a change counter in which a user enters an amount of change between 0.00 and .99, and the program calculates the minimum number of coins ...
[no replies]
Converting an Arabic Number to a Roman Numeral
 
Hello C++ Gurus, I need your aid once again. So far I have the "Menu" setup and now I just need to run a separate class that I created called romanType. I have...
[no replies]
Trying to check for integer
 
I'm writing a program in C++ that's supposed to test two different whole numbers, so I've assigned the numbers to int, the problem is I can't figure out how to ...
[2 replies] Last: Yes that is what I have been looking for, thank you Ben. (by Craig9008)
by tonnot
is STL Find method for vector the fastest?
 
I have a ordered vector. STL finder use internally bubble search ? ( I'd want to know if have I to implement a custom method to do a faster find) Thanks
[14 replies] Last: BTW, binary searches are logarithmic or O(log n). That's pretty fast ... (by moorecm)
by codrgi
search a list?
 
setting up list for(i = 0; i<100; i++) mylist.pushback(i) setting my variable int myvar = mylist.front() how can i search mylist for myvar without ...
[5 replies] Last: Don't avoid the right way just because it is a bit unfamiliar. std::f... (by moorecm)
Array and 2D Class Object array
 
The code below compiles and run fine. My question: is it good/bad programming to use a pointer array class? I only use the pointer object array because I'm not ...
[9 replies] Last: Perhaps you may feel this, but you're wrong. A multidimensional array... (by carebearboy)
by basel
terminate called after throwing an instance of 'std::bad_alloc'
 
Hi All i am coding with c in linux, i have this part of my code: TApplication fooApp("fooApp",&argc,argv); TH2F *h1 = new TH2F("2dim","two-dimensio...
[3 replies] Last: TH2F *h1 = new TH2F("2dim","two-dimensional histogram",100000,0,10000... (by ne555)
September 2011 Pages: 1... 1617181920... 48
  Archived months: [aug2011] [oct2011]

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