Beginners - December 2011 (Page 13)

arrayName.length()?
 
So i started programming again after a long break, and im doing some practice problems. Here is the code i am trying to run. for( int i = 0; i < (people.leng...
[6 replies] Last: You are starting at the first element and comparing it to all other el... (by IceThatJaw)
by MH4
Square Root without math.h
 
Hi guys. I am having trouble coding a square root in c++. My lecturer gave me an math assignment about vectors and i am not allowed to use any other libraries ...
[12 replies] Last: wat coder 777 says is to do thiis:(which would work only if it is a pe... (by mj1709)
Classes Problem
 
I have a class that "cooks" food, using a derived class of class 'Food'. Here are the classes: Class Oven: class Oven { private: int...
[4 replies] Last: Nevermind... I hadn't defined a function in my class... (by doi lin)
Basic Exercises for Practice
 
Hey guys I'm a Beginner to C++ and I wanted to know if anyone knew of a site where I could get practice exercises, or if anyone could post some practice problem...
[5 replies] Last: @doi lin Ha, seems fun. I think I'll try that since I'm finally getti... (by Code Assassin)
Having trouble translating code from Matlab to C++
 
Everything is solved, thank you
[7 replies] Last: Sorry didn't check this over weekend. can I do something like i+dx t... (by Ashishduh)
Getting actual time
 
is it possible to get actual time of the day via c++ program I know how to get system which is just number of seconds
[4 replies] Last: I think it shows no of seconds elapsed form 1970 time of unix i think (by mahinkhan22)
by aizat
bmi calculator- convert (do while) to (array)
 
i need some help,right now i do bmi calculator in do while..i need some help,if someone know how to change it to array..this is my programm: #include <iostre...
[2 replies] Last: thank u my friend, this program using the process (do_while) right? ri... (by aizat)
Exception Handling in c++
 
Hi, I'm trying to catch an exception in c++ this way: try { std::vector<string> output; int bytes = atoi(output.back().c_str()); } catch(exception)...
[3 replies] Last: Ok, I think I understand better exception handling now. Thanks for th... (by JulianRoss)
Charr Array Problem
 
Hi, I've just started learning C++ and I've run into a bit of a weir issue with a char type array. I understand the three basic ways to initialize a char ar...
[3 replies] Last: i did not know that thank you (by Aramil of Elixia)
Copy from an array to another
 
Hi all, This seems to be an easy problem but I can't work out and I don't know why. Here is my code : void copy(int a , int n, int copied ) //n is the number ...
[4 replies] Last: Haha, sorry guys. I don't know why but when I delete all and rewrite, ... (by teaflavor)
Xcode c++ and simplicity
 
Hi, I'm a mac user and I'm making a basic text-based c++ program. Now I would like to get more complex, and make my code easier to read by having multipl...
[2 replies] Last: In XCode 3.2.6, to add a new source file to your project, right-click ... (by Lodger)
by erikn
Working Dev C++ code won't work in Visual C++ (1,2,3)
 
I've been hacking away at C++ for a few months now, making simple console applications in Dev C++. However, after spending time in this forum and hearing more e...
[48 replies] Last: dying to let this thread sail off into oblivion at this point, but sin... (by erikn)
How can I use rand() to gen a number between two values?
 
Hi, can someone tell me how to use rand() to generate a random bumber between two values. I want to write a function "int get_rand(int low, int high);" that wil...
[8 replies] Last: Thanks for the help, if only I was good enough at maths to have figure... (by Integrater)
Reading fixed width columns from txt file...
 
I'm trying to read columns in a text file that won't always have a delimiter but they are a fixed width... I've created a testcase here: https://ideone.com/1...
[9 replies] Last: There is no standard C/C++ trim function, and without using std string... (by closed account DSLq5Di1)
Returning an array
 
Hi all, I have googled about this problem, I know that there are a lot of question about this but I can't still work out. I have an array of integer at the ...
[2 replies] Last: provide both arrays as parameters to the 'alleven()' function (by coder777)
Check if notepad active
 
Hi how would i check if a program is active (On screen)
[1 reply] : You might try to find the running process with EnumProcesses: http://m... (by coder777)
by Grax
Need help in Printing Distinct numbers
 
#include <iostream> #include <conio.h> using namespace std; int main() { const int SIZE = 10; int num = 0, store = {0}, ...
[9 replies] Last: finally i have solved my problem! thanks for all the help! ^.^ void ... (by Grax)
data validation issue
 
hello everyone, first post here probably of many. i've been working on one of my final programs for my intro c++ class. everything is working fine except for ...
[2 replies] Last: Your first approach as you may have figured out by yourself had a stat... (by eypros)
by Yezman
Struct and Class questions.... Plus one kind of class-related question.
 
struct PersonRec { int age; double height; int weight; }; PresonRec Me = (19, 66.5, 140) is an incorrect way to assign values to me. Is ...
[3 replies] Last: 3) You can control the way cout handles the output using manipulator... (by eypros)
Is it possible..?
 
Hey guys, Is it possible to search a text file for a line that begins with certain characters and then be able to display the whole line? For example, sea...
[5 replies] Last: Thanks guys, very helpful :) (by ahoysailor)
December 2011 Pages: 1... 1112131415... 47
  Archived months: [nov2011] [jan2012]

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