Beginners - April 2013 (Page 23)

by nass
How do I compute sum of odd numbers?
 
This program accepts two integers and calculates the sum of all odd numbers that are between these two integers. That is, the sum of all odd numbers that are...
[10 replies] Last: oh I see missunderstood sorry makes more sense on why he is using a lo... (by giblit)
Arduino Temperature test code
 
I am creating an automatic window Opener that uses 2 DS1820 digital temperature sensors. I have them hooked up to the Arduino so that when the difference in tem...
[1 reply] : I think one thing that might help is have a wider threshold, not unlik... (by TightCoderEx)
by giblit
Template/Pointer questions
 
Okay so I have a couple of questions. Q1 : How come this works unsigned int a = 0, *p; p = &a; *p += 1; cout << *p << endl; cout << a << endl; //get output of ...
[9 replies] Last: okay I finally figured out how to use the templates correctly thanks a... (by giblit)
Inflation / Depreciation calculator
 
In an effort to become more proficient with C++, I'm developing small snippets that are of some value to me. What I'm looking for is, can this code be improved,...
[4 replies] Last: Bjarne's book looks particularly interesting, but as I'm partial to el... (by TightCoderEx)
by lmsmi1
Cout all remaining tokens in string?
 
I've got a for loop to print each remaining token from the input string, however the program crashes when I do place a "print" function in the code. Help please...
[2 replies] Last: Is having a variable number of elements in a string array legal? (by lmsmi1)
by Pebble
Getline
 
After the for loop for input has run the first loop (successfully), It ask's for Name, But alway's skip's the input: getline(std::cin, Person .Name); I've t...
[4 replies] Last: Thank's L B. (by Pebble)
How to print first and last day of month Only
 
Hello all, I am new to the forums so let me know if this code is not beginner level and I will post it somewhere else. I am also new to programming, so I ...
[3 replies] Last: " DayOfWeek(month, days, year)" { weekday = DayOfWeek(month, 1, ye... (by Melicalol)
Functions Homework Help
 
Hello, I've been attempting this on my own for awhile and I am still drawing a blank. Here are the instructions listed: Design an algorithm that will input s...
[no replies]
Phonebook Programming
 
I am working on the program but I am having difficulty with the if statements being used to figure out if each structure is empty or not! Could any of you pl...
[no replies]
Difficulty with getline()
 
Hey all, I can't seem to get the getline() function to work properly for me. I'm trying to use it so that I can store full names in a string array consist...
[4 replies] Last: Thanks, Chervil. Worked like a charm :) I put it in the for loop so ... (by thisguyehisaguy)
srand() function help
 
I need help putting together a program that simulates the tossing of 3 die and computes the probability of obtaining each of the values 3 to 18. It should ask t...
[7 replies] Last: http://www.youtube.com/watch?v=SxP30euw3-0&list=UUoxcjq-8xIDTYp3uz647V... (by Catfish4)
by Kobe24
Array size..!!
 
I am asking the user to input only 2 integers and I want to check if the user did input 2 integers using an array. Here is my code. Thanks for the help ...
[11 replies] Last: Not sure if you meant 2 individual values or just to check if you ente... (by Minimacfox)
by Nebur
[Error] ld returned 1 exit status?
 
Hi everybody, I recently got this error in a very simple program, when compiling it. I use DEV 5.4.1, and I have no clue at all of what it means. Anyone does...
[2 replies] Last: Are there any other messages apart from that one? Actually, this looks... (by Chervil)
Why is it good to read numeric data with char before convering to int?
 
It is a question my teacher ask. I have no idea about this.
[1 reply] : Huh? I don't see why you would do this other then maybe to handle user... (by closed account 3qX21hU5)
by aggsyb
Returning back to inputs and finding ram
 
Hi, I started trying to learn c++ yesterday, I understand the logic of what I need to do and in what order (I think!) but have problems with the codes themselve...
[5 replies] Last: Neil, Thanks for taking the time to reply, I really appreciate it!, ... (by aggsyb)
Works in Dev C++ Compiler but not Microsoft Visual Studio
 
This compiles just fine in DEV C++ but in Microsoft Visual Studio it tells me that "finally is uninitialized", but it is initialized. So I'm not sure what to do...
[8 replies] Last: @Zereo Orwell. Note, the compiler issues a warning. Depending on the ... (by Chervil)
Validating a Price.
 
Okay, I have been trying to figure this out for a week now just by looking up online. Now I have to ask for your help. I am trying to verify that the price ...
[5 replies] Last: for(int x = 0; x < Price.length() -1; x++) { if((int)Price >= ... (by pogrady)
System command is not working
 
Hi all, for some reason my system command is not working in my program. I use mac os. I wrote the main program "makefile" that passes control to the executable...
[4 replies] Last: Thank you ALL for taking your time to respond. Also, how do you look ... (by ktk0541)
inline, virtual, symbols?
 
hello everybody. i have some simple questions. what are inline and virtual for? i did some search, but nothing really clarifying. i just understand that inl...
[6 replies] Last: inline means a function can be multiply-defined, that is, you can pu... (by Cubbi)
Questions on this code
 
Hello everybody, I am new to the forums here and I have a few questions on this application I was coding to help me in Algebra a bit. QUESTIONS 1)Is it ok...
[2 replies] Last: Thanks really appreciate it, however when I tried to use the code past... (by BrandonG)
April 2013 Pages: 1... 2122232425... 83
  Archived months: [mar2013] [may2013]

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