Beginners - May 2011 (Page 43)

Capitalizing
 
Hi, I wrote this code first then was asked to modify it so that the program read the contents of the first file and change all the letters to lowercase except t...
[6 replies] Last: here's what i would do have a while loop that loops until the end o... (by prophetjohn)
Overloading function needed?
 
template <class T> T Geometric(T val1, T val2, T val3) { T v = (1/3); T temp; temp = (val1 * val2 * val3); return (pow(temp,v)); } pow ambiguous...
[16 replies] Last: Jimmy, int v = (1/3); will result in v = 0. Why did you declare it ... (by webJose)
by Drue
Text File
 
I have two questions about writing to a text file. I've made and revised a program (thanks too some people on an earlier post), but I was wondering how a code ...
[4 replies] Last: Thanks, I got it working. But I still need the API version. (by Drue)
linear search
 
I'm having the darndest time trying to figure out how to write a function; The user enters a word and that word is sent to a function that searches a 2-dim ar...
[3 replies] Last: it's also not going to compile because of the function header. if Word... (by prophetjohn)
The complete output of the statement.
 
#include <iostream> #include <cstring> #include <vector> #include <algorithm> double x = 974.23; namespace one { double x = 56.1102; } namespace two { dou...
[8 replies] Last: Sigh. argv is the name of the program any arguments following that wi... (by GodPyro)
How do u create multiple files?
 
so i figured out how to create 1 single file (and write in it) but now im having trouble figuring out how to make multiple files at the same time. this is what...
[3 replies] Last: Well, A and C both serve to create different files. Now, let me ask y... (by webJose)
Rock Paper Scissors help plz
 
this is the code for a rock paper scissors game it is not completed yet but is the idea there and is there any thing that needs ti be fixed # include <ios...
[7 replies] Last: r u in csc 110 lol tcc? (by rohanshah1)
How to update MinGW?
 
Hi, it's me again but my problem is that I don't know how you can update MinGW (stuff like gcc and g++). Also, I don't know where else to place this thread, so ...
[no replies]
by arash
function with pointer argument.
 
Hi all , I am experimenting with writing functions with pointers as arguments. There are 2 functions below,one takes a pointer to integer and changes the integ...
[5 replies] Last: Aha...Thanks webJose!! I got it now! (by arash)
mschops? ascii? quick comment/question if you please :-)
 
AWESOME to hear that C++ is so in demand!!! Guess I picked a good one!! I know it's supposedly "on it's way out" yet it still seems so widely used that I doubt ...
[4 replies] Last: haha why did you request me in this lol (by ascii)
Linear search that adds word
 
I'm writing a program that allows the user to enter data into an external file, that data when read into the file is then sorted to list in alphabetical order h...
[3 replies] Last: I suggest using a vector. http://www.cplusplus.com/reference/stl/vect... (by GodPyro)
by steevo
Help with arrays
 
I came across some C++ code that I wanted to use in my Python program, the conversion was fairly straightforward until the following: void ComputeFeedForward...
[3 replies] Last: You're welcome. Thats why we are here. :) (by GodPyro)
Whats a good compiler?
 
Ok im pretty new at C++ and ive been using Dev C++ for a while now but in 2 cases ive had problems with the compiler(or at least think it was the compiler). Wha...
[7 replies] Last: The IDE is the visual, friendly user interface part of programming, an... (by LB)
Seeking guidance about classes
 
Hi all, For my upcoming exam, I have to write/define/initialise classes. Here's a question from my practice exam; 2. Conversion between imperial and m...
[13 replies] Last: Ahhhh I see. Thank you, you have been a massive help. Maximum credit t... (by Jonnyisonfire)
by ascii
algorithm for radicals?
 
does anyone know of an effective way to compute square roots that wont just be brute forcing it by adding a puny decimal like .000000000001 and testing if when ...
[2 replies] Last: haha thank you :) (by ascii)
Double Switch (again)
 
Hi i'm having an issue with the text in cases 3 and 4 not displaying on screen. Once the player has selected case 3 or 4 its will display the option you have s...
[7 replies] Last: I'll try that to Austin Covello :) thanks (by vodkaman6661)
by Alecbg
Help with a 2-D random array
 
There is a problem on my maths tripos to simulate 100 random samples of size n=2 from a uniform distribution on [0,1]. To do this I wrote a program in C++ to a...
[2 replies] Last: 1st, remember to use correct code tag to put your code.. the correct c... (by Kageong)
function definition
 
can a single class have the same function defined twice.plz xplain
[6 replies] Last: As a virtual function sort of. That's not really what happens since th... (by Computergeek01)
correct the mistake
 
sum=0; while(cout<20) cin>>num; sum=sum+num; count++; can someone fix it so that it finds the sum of 20 numbers
[5 replies] Last: The variable in the while(cout<20) cout must be couNt that's number 1 ... (by Mohamed Fouad)
std::sort predicates.
 
Hello, I'm trying to sort a vector of elements using the std::sort() algorithm, but the predicate I need isn't really straightforward, since it needs outside...
[7 replies] Last: I'm not sure how time consuming creating and destructing an object is,... (by Gaminic)
May 2011 Pages: 1... 4142434445... 48
  Archived months: [apr2011] [jun2011]

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