Beginners - October 2008 (Page 10)

Contains a digit
 
I am working on a program that requires that if a number contains a specific digit it does something. Example: 13 - Contains the digit 3 so it prints "Hi". ...
[3 replies] Last: I would probably just store it into a string and use the string functi... (by firedraco)
The bigginers program from the tutorial
 
I was taking the tutorial here. It said the first program most programers make is hello world. I copyed the source code. And then opened a notepad doc and past...
[4 replies] Last: Don't think that programming is very easy. Just keep going ;-) (by Hazer)
Vector output is strange ☺ ☻ ♥ ♦ ♠ ect
 
I'm a new comp sci and C++ student and I'm writing a program on my own for fun and to teach myself some basic C++ coding skills. Anyways I'm trying to write a ...
[4 replies] Last: Basically what happens is this: char ch = ' '; ch = 22; //this ... (by firedraco)
ASCII 30, ASCII 31, '
 
Hello guys, I have a few quick (I should hope..) questions. The assignment is that I'm to read in a file of an encoded message and decode it and print it. ...
[7 replies] Last: You are making a bit of a meal of this. That code.txt file does con... (by guestgulkan)
by kg123
Question concerning *
 
Hello,everyone. I am learning the concept of pointers recently. The reference book said when we declare a variable, * means a pointer.In common statement,* i...
[5 replies] Last: Thank you Buzzy, your suggestion is exactly what I want. Here is my r... (by kg123)
Clarification on if statements
 
I'm trying to get a program to branch out into two different directions without the use of multiple CPP codes. But it's not going very well char BINARY, DE...
[1 reply] : Hello, in line 4 you want to read two variables from the user where... (by int main)
prime number in another angle
 
hello everybody, here a newbie i have this home work about prime number. i should check if a gin´veb number is a prime or not and print the given number is pr...
[5 replies] Last: it is silly some times when someone can sit infront is computer for ho... (by tukuniata)
a strange way of using variable
 
Hi all, I'm a new C++ programmer, i was so surprised that this trunk of code is able to be compiled by VS C++: { ....... int x; x; ....... } ...
[2 replies] Last: Thanks int main, it would help me lots :) (by baothuan)
problem with output file
 
After the program runs it creates the file but the LineUp.dat file just reads "1054C9AC1054C9AC1054C9AC1054C9AC" instead of putting what entered in. What im ...
[1 reply] : I don't think getline(cin,name); will return the string for outfile...... (by firedraco)
by cplus1
arrays program
 
Write and test a function that will determine whether the values in an array are in ascending order (adjacent values are increasing or equal in value) or descen...
[2 replies] Last: I think that dinamic allocation would be better... int npts, *arra... (by Bazzy)
Assistance needed with program!!
 
Hi this is my first year studying c++ and I really need help with a program Here is what the program should be: Welcome to Multiplication Practice Softw...
[7 replies] Last: The variable 'right' wasn't declared too. I suggest you using 'num1*n... (by Bazzy)
Really large numbers Fibonacci sequence past 93
 
For fun, and a love of numbers, I wrote a very simple program that desplays all the numbers in the Fibonacci sequence upto x number. It of course ends the loop ...
[3 replies] Last: Duoas, Great reply. Those links show me exactly what I need. Thank y... (by Cerburos)
Finding all prime numbers between 2 values
 
My assignment is to find and output all the prime numbers between two user inputted values. Also, the program is required to contain two functions with the foll...
[5 replies] Last: You are close. // pseudo-code void ShowPrimes( int number1, int... (by jsmith)
by ggraz
Floating Point Addition Question
 
The following code is actually C , but I am hoping someone can see where my error is ? I am trying to add two floating point numbers by shifting bits and addin...
[3 replies] Last: Ok, I wrote my own version of this and got it working. What I fou... (by jsmith)
String over char[] ?
 
Ive tryd to find the answer to this, but cant. What is better to use? A string variable or a char variable. (eg. string Name = "jack" or char Name = ("jack") ...
[3 replies] Last: Thanks alot!! You guys answerd my question perfectly!! Great site! (by Icarus247)
Why won't this work? File I/O concerns
 
Don't be afraid of the length of this. It's not too long! urgent help! I've got ski_data.txt's data like Head Mojo 75 Jr 75 97.99 Head Monster m77 181...
[2 replies] Last: THANKS! :D I couldn't figure that out for the life of me, staring at i... (by Copycat)
Deleting contents of an Object
 
Hello, I am a complete newbie to cpp..so pls forgive if i ask something obvious. say for eg. i have a class Temp: class Temp { public: ...
[2 replies] Last: what i was asking was will the char* value inside Temp class would be ... (by amalshah71)
For loop wont repeat
 
For some reason my for loop is not repeating. I have been looking at this function for a couple hours now. I cant see where the error is. This if a function for...
[7 replies] Last: in places where you have used an 'if' conditional and there are only t... (by o0OpsyphiO0o)
by gAaRa
Wrong output from file (.txt)
 
#include<conio.h> #include<fstream.h> #include<iostream.h> #include<limits.h> class customer { char city ; char state ; char name ; char ema...
[7 replies] Last: Thx a lot firedraco. Problem Solved ! abc<<name<<'\n'<<email<<'... (by gAaRa)
Junk Input Causes the Program to Ignore "cin.ignore(1000, '\n');"
 
I'm having trouble with this section my code and am hoping that you can help me diagnose and solve the problem. I'm not sure if it makes a difference, but I com...
[2 replies] Last: I would've just used getline(cin, string); . (by Zaita)
October 2008 Pages: 1... 89101112... 20
  Archived months: [sep2008] [nov2008]

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