Beginners - February 2012 (Page 28)

Stringstream
 
I already know about stringstream and how you can use it as a variable type, but I don't know how to clear it. stringstream v; int w; string numbers; v...
[2 replies] Last: Thanks. This should work. (by GRex2595)
I need help badly.
 
I am a post transfer student in my third year of programming and got transferred into a university that uses C++ while my old college used C# and Visual Basic. ...
[5 replies] Last: Go through the documentation on this site, then grab a good book like ... (by Wisely Done)
Building a calculator
 
Hi, I was assigned a problem where I have to build a calculator but I'm a little confused on how to get it done. Here's what I'm asked to do: Build a calcu...
[12 replies] Last: if userChoice is a char, then it shouldn't be a problem. If you chang... (by GRex2595)
Stuck
 
Hey, I'm a beginner and I'm stuck on this one assignment. I've included the instructions and what I have so far but don't worry about the whole thing. The sente...
[10 replies] Last: If you know arrays, then you could make the number a string and copy i... (by GRex2595)
Using static member variables.
 
Hello, Since a number of previous "How do I solve my globals?" topics, I've gone the OOP-ish way of programming. And I've ran into my first problem. The p...
[7 replies] Last: Guess that's where my confusion came from. Never worked with non-const... (by Gaminic)
by cokane
% operator (1,2,3)
 
I need to write a program that has two functions main and remainder. The limitation is that I cant use the % operator to implement function remainder I have to...
[44 replies] Last: The compiler does not generate an error. Not mine at least. It think ... (by Gaminic)
pointers on pointers syntax
 
Hi all, I am just reading the C++ tutorial from this site and stumbled upon some understanding problems concerning pointers. On page 71 there is a discussion o...
[7 replies] Last: Don't worry about pointers. They'll grow on you soon enough! (by Gaminic)
implement a class Person with two data members
 
New C++ student here, and so thrilled this forum is available to beginner! Thanks for taking the time! My assignment is to implement a class Person with t...
[8 replies] Last: Well, you don't want your array size to be a private member of your cl... (by MrHutch)
Pointer as permater
 
Okay so I am trying to have a function fill a 2d char array with values, but I keep getting an error of incompatible pointer type . #include <stdio.h> ...
[12 replies] Last: Thankyou it works now. I am guessing that i had copied the first for ... (by evanc9606)
cout numbers with all digits pair numbers
 
Write an algorithm that displays the numbers that have all their digits pair. The numbers will be introduced by the user, the program will end when 0 is introdu...
[4 replies] Last: Please mark as soved if it is solved (by evanc9606)
quick array question
 
How would I Declare an array of ints named Years of size 100. Write code that initializes each element of the array to a value of one more than the index.
[3 replies] Last: I do believe something like this will do the trick. I don't know if y... (by evanc9606)
Listless pigeonholing.
 
Hello, I'm trying to analyze a 2D (cartesian) space. On the plane are a number (N) of points identified by their coordinates (x,y) and a colour, modeled by a...
[8 replies] Last: Seems a bit overly complicated and most likely there won't be much 'co... (by Gaminic)
Error: expected primary-expression before 'else'
 
Hi, my name is Josh and this is my first time searching for help with my c++ class. I have to write a program that will ask for the product number of an item, t...
[3 replies] Last: Please mark the problem as solved (by evanc9606)
How to define vectors in an existing vector ?
 
Hi all, I have defined a big vector : vector<int> v(1000000); If I initialise it like this : for (int i = 0; i < 1000000; i++) v = i; I would ...
[4 replies] Last: Thanks guestgulkan. Of course, my example is simple for clarity. So... (by lalebarde)
A little project with big hopes, pls help!
 
So I am doing my best to learn as much as I can about c++ and since I learned PASCAL in high school, it wasnt that difficult but I always run into some small pr...
[2 replies] Last: Maybe... void creare (agenda *a, int n) void afisare (agenda *a, ... (by vin)
Need Good Books.
 
hello seniors, i need a lot of great books, not on programming in specific computer languages, but on "programming concepts", "how it works?", "how it is crea...
[5 replies] Last: Thanks guys, i think i should read "pragmatic programmer" first. (by markode)
Unsigned Integer
 
For a project I have to take in two integers and run all the bitwise operators on them. I got them all to work except for the (~) operator because it makes the ...
[1 reply] : Make 'fourth' unsigned. It doesn't matter what 'a' is, because you're ... (by hamsterman)
explicit specialization -- Error
 
I'm a beginner in C++ ,here is a part of the code: #include <iostream> #include <string> using namespace std; struct box { char maker ; float he...
[2 replies] Last: Thanks for reply. It is really helpful. (by himbooma)
<vector>.erase isn't working?
 
Basically, here's what I have: #include <iostream> #include <time.h> #include <stdlib.h> #include <vector> using namespace std; class card { publi...
[4 replies] Last: Consider using std::deque<> as the sequence container when adding o... (by JLBorges)
Remember my name (1,2)
 
I've been trying to figure out how to get my program to ask for your name once and never have to add it again. *Program starts for 1st time* What's your nam...
[36 replies] Last: dude... i lost my xbox live mic haha Yeah, you would. Dam, there would... (by TruYadoo)
February 2012 Pages: 1... 2627282930... 64
  Archived months: [jan2012] [mar2012]

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