Beginners - April 2012 (Page 55)

Trouble with data structures
 
This is my first time using structs and I'm having trouble with understanding how to use one. I need to use a struct to organize the information for each sample...
[4 replies] Last: Ok thanks. This was really helpful (by tristanp2)
Billing charges program
 
A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in exc...
[no replies]
find the smallest word in the string. (1,2)
 
hi everyone, i need help with a very simple task. i have to enter a sentence and simply find the smallest word in the sentence. i tried using strtok, and stuff,...
[20 replies] Last: can anyone help?? (by cocopuff)
estimating pi
 
I'm a substitue teacher and I need to know how to estimates the value of the mathematical pi using c++ so i can help the students with any question they might ...
[5 replies] Last: There's nothing such as infinite series in real world, even in mathema... (by TheDestroyer)
Void will not work
 
Thank you in advance for any help. #include<iostream> #include<string> #include<ctime> using namespace std; void Spin(int&); ...
[11 replies] Last: Thanks for all the help! (by closed account 1hv7ko23)
by edge87
Serial in Linux
 
I'm working on building a program that will send binary data to a Arduino micro controller in Linux. I found this site ( http://www.easysw.com/~mike/serial/seri...
[no replies]
Starting out again
 
I'm always really paranoid about stating topics that I missed the five thousand other topics of the same content, but I can't seem to find what I need. I used t...
[3 replies] Last: Eclipse and Netbeans are slow because they're based on Java. Try Code:... (by TheDestroyer)
Very easy question...std::string* to std::string
 
I have a value is a void *, which is a std::string... std::string *fooPtr = static_cast<std::string *>(value); std::string newFoo = fooPtr->c_str(); ...
[8 replies] Last: it was cashing because other thread 2 closes quick! I fixed it...Tha... (by twoencore)
Is my code bad or good?
 
HI! Today I would like to know what do you think about the code below: It's a timer. Please tell me would you have done something differently? does the ...
[2 replies] Last: Good spacing, make sure you prototype your functions. When you write ... (by Windwhistles)
by Ch1156
Check to see if char or string
 
When i am building programs that require input of integers, i quite often find that if you enter a letter or words while the integer is in a loop, it will screw...
[3 replies] Last: Input it as a string and convert the string using atoi() http://www.cp... (by SameerThigale)
Make this operation reoccuring.
 
Hi, Im a new student at c++ and have began learning from the book "C++ Programming From Problem Analysis to Program Design Edition 5 by - D.S Malik" In t...
[no replies]
by Owain
Trouble with my string function
 
Hello, I am writing my own string library as sort of an exercise and I am doing rarther well so far. I am a bit stuck on a function which locates the occurance ...
[4 replies] Last: Okay thankyou, its working now :) (by Owain)
Textbook problem involving strings and vectors
 
Hello, in the textbook called "C++ Primer" there is an exercise that I am having trouble with. The problem is stated as such: "Read some text into a vector, ...
[1 reply] : This will read a word. std::string word; std::cin >> word; ... (by Peter87)
friend ostream& operator<< ....
 
Hi, it's probably something small, but I can't seem to find it. So I have a friend set up in my declarations. private: struct Node { int E...
[7 replies] Last: @TheDestroyer, I don't know what you want me to read on that page. ope... (by Peter87)
Type Conversion
 
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <cstdlib> #include <windows.h> #define TAM 20 #define PI 3.14159265 ...
[2 replies] Last: Thank you!! (by Anna Rafaela)
by jalfor
Pointer Question
 
Just a quick question that I am slightly puzzled by: Pointers as function arguments; if I was to write something like this: blah(int *number) I am giving...
[3 replies] Last: Ah, I see. Thanks a bunch (by jalfor)
What am I missing?
 
For an assignment for my C++ class, I have to develop a program that you essentially play Rock, Paper, Scissors with the computer. I have this so far, but the c...
[7 replies] Last: Since ::winner() determines who actually won (assuming), then it wou... (by closed account zb0S216C)
How Do I Make this program loop?
 
#include <iostream> #include <algorithm> #include <vector> #include <ctime> #include <cstdlib> using namespace std; int RandomNumber () { return (...
[3 replies] Last: No, you can just keep track of something. For example, if you wanted y... (by jalfor)
loop
 
I want... cout << "continue ? (y/n)"; If yes i want my cin<<(numberx2) every-time someone hit's yes it doubles. if no, i want my program to cl...
[13 replies] Last: I want to find the value pi, every-time there is a (yes) the n=8 doubl... (by closed account zT7X92yv)
pointer array
 
I'm looking to show the amounts stored in the array that i saved using a pointer, but i am only getting back the dresses when i use my .show function. i could u...
[1 reply] : I did not look through all your code but it is obvious that this funct... (by vlad from moscow)
April 2012 Pages: 1... 5354555657... 66
  Archived months: [mar2012] [may2012]

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