Beginners - November 2010 (Page 20)

problem in counting total number of words in sentence
 
hi i am trying to find out total number of words in a sentence but i am facing a problem. when i run the following code and enter the string in for example ...
[8 replies] Last: It still works. cin >> anInt; cin >> myParagraph; cin >> aStri... (by Duthomhas)
randomizing elements in an array
 
how would I go about randomizing both objects and integers in an array of any size?
[1 reply] : random_shuffle(array.begin(),array.end()); See http://www.cpluspl... (by Athar)
Missing '}' ?
 
Here I have posted my code, followed by the error message. I cannot figure out where the two missing '}' are, because I only have two while statements, both of ...
[3 replies] Last: Heh, no problem. Better a silly typo than an actually annoying bug. (by Zhuge)
by jjp
How to write a program for a geometric mean
 
Hi, I'm pretty bad at using c++ and need some help writing a program that uses a call-by-value function to calculate the geometric mean of an array for my cla...
[9 replies] Last: float calcGeoMean(float x , int n); int main(){ //... float geoMea... (by ne555)
pointers
 
I couldnt find any information on this topic. If we have a structure say struct TheData { double* Values; unsigned long Length; bool Valid; ...
[1 reply] : Yes. I don't understand what you mean, TheData::Values would be a p... (by firedraco)
Computer crash with c++?
 
Hi everyone, I'm new, both here and to c++. I have a quick question. I just wrote a program where I have to do A LOT of computations. And I mean A LOT. :) I...
[1 reply] : As long as you aren't randomly changing memory (which the OS wouldn't ... (by firedraco)
by mzdr
passing info from function to function
 
Ok I want to use a function to perform some calculations and then pass that info to another function to display.given my code so far I cant seem to figure a way...
[2 replies] Last: double ComputeAverageTemp(int hr_tmps ,int tmp_num)//calculation func... (by guestgulkan)
problem creating files
 
hi, i have a problem with the "createFiles" function ... #include <stdio.h> #include <stdlib.h> #include <string.h> /* reverse: reverse string s ...
[2 replies] Last: thank you very much. and thanks for the suggestion for using sprintf. ... (by pirlo89)
Writing to a file.
 
So lately, I've been experimenting with Qt and I'm loving it thus far. What impressed me very much was how easy it is to write variables to a file. For exampl...
[2 replies] Last: T would be deducible from that (although vec should be a reference... (by guestgulkan)
by jpc271
Looking for a better format
 
Here is what I currently have. #include <iostream> #include <cmath> #include <iomanip> #include <fstream> #include <cstring> using namespace std; ...
[no replies]
can anyone point me in the right direction
 
when i compile my code it runs fine. but when i try to add a word or print the word list it goes crazy and breaks.. main int main() { string line; i...
[2 replies] Last: here is the whole code main.cpp #include <iostream> #include <... (by jland68)
Struct pointer initialization
 
Hello everyone, I defined my own structure using struct TheData { double* Values; // holds the data to be filtered unsigned long Length; // numb...
[7 replies] Last: Since you seem to be using C++, you could use what is called a constru... (by Zhuge)
by firix
How do I define a class Imaginary???
 
Hi friends, Define a class Imaginary to represent imaginary numbers. Define class Complex based on that.Implement the fundamental arithmetic operators. Th...
[6 replies] Last: thanks hamsterman (by firix)
showing words separatly in a string
 
hi i am trying to display words in string separatly. What do i want is to display all the words in a string which is entered by user but do not dislay those ...
[no replies]
by firix
c++ ebook?
 
Hi guys I would like to receive information from you about a book Bjarne stroustrup of programming principles and practice using c++ If you have...
[13 replies] Last: thanks nathan10; (by firix)
by firix
Define a class Mat4 as a vector of four Vec4s?
 
Hi friends, Define a class Mat4 as a vector of four Vec4s. Define operator to return a Vec4 for Mat4 . Define the usual matrix operations for this type. Def...
[2 replies] Last: What you do not understand? everything is very clear: Define... (by firix)
by Fedot
Grafic Coding!
 
Hello again! This is my first project in grafic coding and i ask for some help! I wan't to make a interface to be like this and connect it whit my c++ progr...
[3 replies] Last: Well, those are libraries, they contain functions you can use in your ... (by JoR)
by CLnoob
Can't figure out my MAX/MIN issue
 
Hey all- so here is what i'm trying to do- have the user input a .txt file, read the values from the 1-dim array, and output the average, largest, and smalle...
[4 replies] Last: Ok- so after you caught my stupid mistakes I have this corrected and w... (by CLnoob)
Programming Question with Arrays and Functions, C++?
 
Can some explain the use of arrays and functions for a problem I'm having trouble with, we are learning about arrays which I understand the basics of, but imple...
[4 replies] Last: Thanks for the help, but how can you use that for this problem, becaus... (by closed account 172v0pDG)
Fibonacci Sequence
 
I'm trying to find the first term of the fibonacci sequence that has 1000 digits. When I print the terms, the first 40 are positive, but then some of them begin...
[11 replies] Last: It's not that hard to extend the number of digits a int can hold. Just... (by Raggers)
November 2010 Pages: 1... 1819202122... 42
  Archived months: [oct2010] [dec2010]

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