Beginners - September 2011 (Page 17)

by aag567
Comparison of string characters
 
Hello everybody, I'm new to C++, taking my first course in college. In my reading, I'm stumped by how string values are compared. According to the book: ...
[2 replies] Last: In C++, this doesn't work at all because string literals are const cha... (by hanst99)
Srand (Random Number Generator) Not Working!
 
Hello, switch(userResponse) { case 1: cout<< "Now, would not be a great time to admire the view! You're being attack by zombies!"<<endl; ...
[2 replies] Last: Thanks, It fixed my problem. (by Code Assassin)
putenv() & shell variable scope
 
Ok, not seeing any reply, I try to pose the question in a more general mode: From within a C++ program I need to set a shell global variable in a permanent mod...
[2 replies] Last: Why not saving your string in a file so that it can read it during the... (by coder777)
Reading and Countinging from File
 
I am trying to make a program that reads a given file, and then reads a user given file and picks out the same words and shows how many times they appeared in t...
[no replies]
by PeterK
need Help! get Key State (Linux)
 
Hi, I want to get the Key State of the arrow keys in linux, because I'm trying to create something like a simple game. I've been searching on Google for hour...
[5 replies] Last: You can just save it, but you will need the qt library (and the tools ... (by hanst99)
Rounding Minutes up to nearest Hour.
 
Hi guys. I'm currently taking Beginning Visual Basic programming class. I'm doing my 3rd project but I am completely stuck and cannot continue. I am doing a...
[7 replies] Last: To get the nearest hour write int hours = (rentalMinutes + 30)/60; ... (by mbentley1989)
AddRecord
 
hi im just a beginners. i need help on the add record the question is asking to add only 5 record of students name but avery time the program go to choice menu ...
[no replies]
need help with finding the occurrence
 
I need to write a program that reads a line of text from input and then return the number of times that the word "code" appears.I am allowed to use any loop, su...
[3 replies] Last: How do you know that a variation of "code" appeared 1 time? Translate ... (by Moschops)
Global variable not recognized as 'global'?
 
Here is the code: #include<iostream> #include<cmath> using namespace std; double distance=0; struct Point { int x; int y; };...
[2 replies] Last: You the man (by stridexr)
need help with if and else
 
I have to write a program to out put string good, bad, great depending on the user input. Here is the question A party is good if both tea(int) and candy(int) ...
[2 replies] Last: it worked thank you for your help... (by zcarfaz)
Help with formula problem
 
hi there, I am trying to get this quadratic problem to work. it is suppose to how many distinct roots there are, and what they are. #include <iostream> #i...
[1 reply] : What's the problem? And please indent and use [co de] tags.... (by Zhuge)
by Piika
Can't figure out how to terminate my program.
 
Here is my program: #include<iostream> #include<stdlib.h> #include<vector> #include<string> #include<algorithm> using namespace std; int main() {...
[2 replies] Last: As it is, you could check the vector before inserting a name to see if... (by Zhuge)
are unused variables are bad thing?
 
if i will use variable and leave them (not taking any work from them) can it lead to some serious problem like slow down of program or exploits or something lik...
[4 replies] Last: And it begs the question why the hell those variables are even there... (by time to c)
by hannjo
Help getting started; conveting binary to decimals
 
I am completely new at this and my professor didn't really explain how to start a problem like this. A little hel would be greatly appreciated. Assignment: ...
[2 replies] Last: can someone please help. Im getting really stressed out because I can'... (by hannjo)
Question on Switch Statements!
 
Hello, switch ( choice ) { case 4: cout<< "You look around, and look around at the silent, dreary, mysterious enviorment of the run-down abandoned airbase....
[2 replies] Last: Thanks so much, shacktar! I'll do my best. (by Code Assassin)
Assigning values to structure in array
 
Suppose my employee.txt have this; first name 1111 departmentone second name 2222 departmenttwo third name 3333 departmentthree and the suppose-output is....
[no replies]
Help on book exercises.
 
I'm reading through "C++ without fear". You don't get answers for the exercises and I'm stuck on one so I can't look it up. I'm suppose to make a function that ...
[no replies]
Base Conversion
 
How do i write a program that allows the user to enter the base of a numbering system (2 for binary, 10 for decimal, 8 for octal..) Asks for four digits, and Ba...
[8 replies] Last: You should probably post that then, because I didn't see it and I don'... (by ascii)
C++ Code help
 
Ok I got this so far #include <cmath> #include <iostream> using namespace std; int main(int argc, char* argv ) { int n = 1234; int d1 = n % 10; ...
[4 replies] Last: Okay. I'll give you a nudge in the right direction. ifstream in; in.... (by Albatross)
Question On If Statement
 
Hello, My question is: Can you have multiple if statements within an if statement? Thanks in advance. - Code Assassin
[9 replies] Last: If you are using a switch statement you need to put a break; after e... (by firedraco)
September 2011 Pages: 1... 1516171819... 48
  Archived months: [aug2011] [oct2011]

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