Beginners - April 2013

Copying fragment of a string to another string.
 
Hello, I am having problems copying part of a string into another string. For example, I tried the following: int main() { string one; getline(cin...
[5 replies] Last: Awesome, thanks. (by gutialejo)
by foxone
Destructors and Constructors
 
Hey, so i wrote this DATE class and I'm still new to programming and really just do not understand the concept of Destructors and constructors. I'm supposed to ...
[2 replies] Last: Alright, your indenting is making me twitch, so I've fixed that up for... (by Oria)
Fibonacci Program
 
Hello. Today I am working on a project in which I have to make a program that can solve and print the first twenty numbers of a fibonacci sequence. I do not wa...
[4 replies] Last: This could be simple. You need to use some loops to accomplish this ta... (by rcast)
patterns
 
Write your question here. I'm trying to make patterns with stars and spaces. I made a triangle and a diamond and I thought a checkerboard would be easy, but I'...
[2 replies] Last: You should alternate 0's and 1's. Seems so simple (by eraggo)
"<class-name> already defined here"
 
I've got quite a large project I'm working on and lets say I've made an additional maths library for certain special functions which make my life easier... Mul...
[2 replies] Last: Now I feel dumb... Perhaps I need a day off XD But cheers! (by TheBeardedQuack)
Having trouble pointing to a structure
 
Hello, I am sorry if this is such a simple fix, but I have a bad habit of making things harder for myself. I am having trouble with pointers and currently have ...
[6 replies] Last: You declared function calc_BTU as double calc_BTU( building ); but d... (by vlad from moscow)
by ABL
Forward declaration error
 
I get a compiler error in gamestate.h and I'm not sure what's causing it because introstate.h is setup in a similar manner but working fine. The error message i...
[3 replies] Last: In `gamestate.h' you are dereferencing the pointer, a forward declare ... (by ne555)
by liz99
how would you go by creating this
 
write a program that uses a switch statement to create a menu for entering and reading data from a text file. the menue should contain 'A' to add a record, 'D' ...
[4 replies] Last: Why don't you start? Aceix. (by Aceix)
by aggsyb
Mouse positioning inside a window
 
Hi, I already am able to move the cursor to any position within my screen but I would like to be able to only move the cursor relative to the program. Ex...
[2 replies] Last: Sorry forgot to say its on visual studio and the application im trying... (by aggsyb)
by animus
C++ Programming Help
 
I'm a beginner and I need help with a homework I have for my C++ class. I understand most of the basic concepts but I just have trouble conceptualizing and putt...
[11 replies] Last: So Animus, I'm not sure if you have gone over pointers yet, but to cr... (by Ssturges)
Displaying files through structures and functions
 
Iv only started a Persistent Data course and im struggling. I have to display customer and sales details.. but unsure what way to go about it. Here is my layou...
[14 replies] Last: #include <stdio.h> #include <string.h> #include <stdlib.h> struct c... (by eagle69)
Adding sales and customers to a database
 
I have been given an assignment in persistent data(Language C), basically i had to be able to search for a customer or a sale which i think i have done, and con...
[no replies]
Homework Help please!
 
Hello so basically my project goes like this: Write a C++ program that reads in two positive integers that are 20 or fewer digits in length and outputs the sum...
[no replies]
by kiste5
Help with c string hw please.
 
Wrote a program to read your name.Count the number of letters in your name. use while or for loops do not sure strlen. helpl please im a beginner using ...
[7 replies] Last: [quote=kiste5]how is this, i dont have a complier to check if its real... (by booradley60)
cin validation help
 
i know how to use 'do while loop' to validate cin input for integer or string input. but i have many cin in my cpp file. if i have 10 cin, do i need to use 10 '...
[1 reply] : You could use a function(possibly overload if you want strings and int... (by giblit)
Input validation not 100% right
 
I'm trying to write a menu-driven program for a final project. If the user enters a letter instead of a number, an infinite loop occurs. How do I fix it? The du...
[2 replies] Last: Bless you. Thank you. I hope you can imagine how thankful I am. This i... (by errorMissiNotFound)
How do you add all the values of an array together?
 
In, void process(SStudent students , int size) I want it to take all the scores in the test array for a student and add them all together and put them into the ...
[2 replies] Last: You need to set testAve and hwAve to zero for each student before... (by Chervil)
Trying to avoid bad habbits early.
 
So this is my code for a game of tic tac toe, obviously it is not complete, I need to add in a restart component at the succession of a game and PC AI. What ...
[6 replies] Last: Do you mean 'numToChar(int x)' instead of calling it inside another f... (by MiiNiPaa)
Possible misuse of "new"
 
Hi All, I'm relatively new to C++, I'm trying to create and utilize a class object, but while my code compiles seamlessly, it appears to hang while creating th...
[9 replies] Last: I was under the impression that I needed to use "new" in order to cre... (by MikeyBoy)
What is a C-string? (1,2)
 
what is a C-string? Is it possible to show mock code for a c-string?
[23 replies] Last: There are strings and there are string literals. The difference betwee... (by vlad from moscow)
April 2013 Pages: 123... 83
  Archived months: [mar2013] [may2013]

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