Beginners - February 2012 (Page 63)

Insertion Sort
 
Was trying to come up with an algorithm for 'INSERTION SORT' based on the below description: "The insertion sort splits an array into two sub-arrays. The first...
[2 replies] Last: - Thank you! - about the formatting - yes will make a note of it. As... (by dolphin spa)
Make variable recognize divide by 0
 
I need for the line that executes choice==Q to also know that when the user inputs 0 for num2 that it displays that you cant do that #include <iostream> usi...
[6 replies] Last: Sure you could filter the inputs, but what if the inputs are all const... (by Stewbond)
two dimensional array w/ pointers
 
Hi, Everyone, I'm new to C++ and I've been trying to figure this out for the past two days. I have to make a function that allows the user to print out a ...
[3 replies] Last: *(*(a+1)+2) is the same as a ok let me try to break this down: (a... (by dolphin spa)
operator overloading +, -, and =
 
i know i don't need to overload the = operator because of memberwise assignment but i was wondering why this code will work correctly if i dont overload the = o...
[7 replies] Last: That's one way to do it, yeah. Another way is something like this: ... (by Disch)
Getting a number into written form
 
Hey everyone, I am new in C++ and taking a intro c++ class. I would like some help on our project for the class. Which we have to take a number and get it to w...
[no replies]
How to erase cin info?
 
My program is set up to ask the user for one letter(prompt1), and then a string of letters(prompt2). I have the logic correct but there's a small problem with t...
[4 replies] Last: [quote=Cuddlebuddie928]entered 123456 (enter) then 789 and got the fol... (by Cubbi)
by Rave
Whats wrong here? object not a member of class?
 
I am trying to re-freshen up on C++, i been using Java and Python lately. #include <iostream> using namespace std; class animal { private: ...
[8 replies] Last: thank you so much, i understand now. I am learning better now than wh... (by Rave)
by Mat001
Saved scripts vs compiled files
 
Hi, A friend new to programming asked me what is the difference between a saved shell script and a compiled executable binary file? We were talking about th...
[2 replies] Last: Thanks. I'll try to get away by introducing the difference between a ... (by Mat001)
by Nalyk
Character counting!
 
Hey guys. I'm using CLR to try and count the number of lowercase, symbols, capital letters, consonants and vowels in a string. I think I've got everything els...
[5 replies] Last: Figured it out. I couldn't get ToLower or ToUpper to work the way I w... (by Nalyk)
by Daker3
Decimal Precision [Answered]
 
I'm making a matrix class and comparing 2 matrices. So, I made an == method. However, it doesn't seem to work when I use doubles. I output my answers to the scr...
[2 replies] Last: Thank you. I can't believe I didn't think of checking for a small diff... (by Daker3)
Not compiling?
 
Hi, I'm extremely new to programming; in fact, I have no outer experience and am probably jumping into the deep end with C++, but whatever. Anyway, I downloade...
[2 replies] Last: The hotkey for compiling your code in Visual C++ 2010 is f7. To run t... (by Nalyk)
by YBCO
Linking diffrent funtions
 
Hey, I am very new to C++ and am tryng to write a program where after a task has been compleated the program links back to the start. The only problem im havin...
[3 replies] Last: It will return to main when the function ends, because main called it ... (by LB)
Functions not working properly in my program
 
Hey everyone, I have this program here that runs properly but somehow 3 of my functions(divisible, index, and userKey) aren't giving me the proper numbers. -The...
[4 replies] Last: Not necessary. You have i++ to index into the array. You merely have ... (by roberts)
No looping statements
 
Write a program that prompts a user for a text made up of 5 words each ending with a /, and extracts and prints each word without the /. At each step you are re...
[14 replies] Last: #include <iostream> // for cin #include <string> // for getline... (by Texan40)
Working with Arrays and Functions
 
Okay, so I am working on a program and have the following code so far. I am receiving these errors: ------ lab1c.C: In function ‘int main()’: lab1c.C:30: e...
[5 replies] Last: You already have the index number. Pass another array, to save the in... (by Lynx876)
String Help in Parts
 
How do I output specific parts of a string that I don't specifically know what is assigned to it. Like the information assigned to the string is determined by t...
[9 replies] Last: Did you include <sstream>? (by Athar)
How to check for equality against absolute 0?
 
I'm writing a program in which I need to check if a certain "double" number is an exact integral square root or not. For example, if applied in the Pythagorean ...
[10 replies] Last: This is easy reading and also very interesting http://www.parashift.c... (by mik2718)
by Leta
[HELP] C++ algorithm for finding files
 
I have to write console C++ program which finds specific file under C:. File name with its extension should be written in standard input, and the program shou...
[1 reply] : If you are on the windows platform look up FindFirstFile() on MSDN. I... (by Texan40)
[HELP] converting a for loop to do while
 
i have a function that contains a for loop and i need to change the loop to a do while. im getting build errors with my changes. //original double getHighes...
[3 replies] Last: Thank you, i butchered the code, but managed to figure what i messed u... (by nickoolsayz)
Windows has encountered a problem
 
Could you help me understand why i get a don't send error with no warnings and no errors? #include<iostream> using namespace std; int main () { int v...
[6 replies] Last: thank you for the feedback, i'm really noob at this and a fresh eye is... (by Alex Bratu)
February 2012 Pages: 1... 61626364
  Archived months: [jan2012] [mar2012]

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