Beginners - February 2014 (Page 58)

by alsade
get method prints only first letter in char array..why??
 
Header: class employee { int* id; char* name; int daysNotPaid; bank mybank; int accountnum; int* datebirth; double balance; public: employ...
[1 reply] : That is because saying *name is actually dereferencing the pointer y... (by TwilightSpectre)
SWAPPING ARRRAYS
 
ARRAY1 1 2 3 4 5 10 9 8 7 6 ARRAY2 0 0 0 0 0 0 0 0 0 0 -------- Transferring to 10 1 9 2 8 3 7 4 6 5 1 2 3 4 5 6 7 8 #include...
[1 reply] : You already have an array of 2x10. What are you trying to do with this... (by giblit)
Need Help With Tutorial...
 
So, I went to the tutorials offered via cplusplus and am having trouble getting reality to meet expectation. Their code(www.cplusplus.com/doc/tutorial/ntcs/)...
[5 replies] Last: Thanks! I've finally got it to work the way I want!!! Thank you to eve... (by MattTuck)
by kcteo
Window C++ application homework help
 
Hi all, im a total noob having to take C++ as part of my design course please help me! Win Application using visual studios add item C++ Start with this code...
[3 replies] Last: He means what code have you done so far for the assignment. Doing the ... (by giblit)
String Input Problem :(
 
I am trying to enter the length of a string and then the string. However the string is not taking the input. Plz reply fast, thanks in advance :) #include<i...
[1 reply] : The reason is that when you have done cin >> n , a newline is left ov... (by TwilightSpectre)
by qmzh85
swap two values with a member function
 
I understand if we simply define void swap(int a, int b) , then calling this swap(x, y) function will not change the value of x and y, since x and y are "cop...
[11 replies] Last: As NT3 indicates, it seems that this swap() function works as passing... (by cire)
Sending array of ptrs to function of class
 
Hello all, So I can't seem to find anything via google on this, so I figured I'd ask you Essentially I have an array of pointers that I want to send to a so...
[5 replies] Last: Arrays are passed default as reference. Arrays are passed as poin... (by cire)
Simple if program
 
This program simply states whether a number is positive, negative, or zero. However, after inputting a number nothing happens. It must be something stupid I'm m...
[2 replies] Last: Of course, thank you! (by Katie Gerloff)
Calculus programming help..
 
Hello everyone, I'm having a difficult time making a calculus equation for my programming assignment. This is a intermediate programming class and I currently a...
[4 replies] Last: @Duoas Thank you so much. That answered a lot of questions I had. I'll... (by learningeveryday)
ARRAY TRANSFER
 
ARRAY1 1 2 3 4 5 10 9 8 7 6 ARRAY2 0 0 0 0 0 0 0 0 0 0 -------- Transferring to 10 1 9 2 8 3 7 4 6 5 #include <iostream> using namespace std; void main(...
[1 reply] : int size_x = 2; int size_y = 5; int 2D_Array ; There is your 2D ... (by IceThatJaw)
I know how to do it on paper, but not in code! HELP PLEASE! (1,2)
 
programming class is basically teach yourself c++. I know how to find a damn prime number on paper, easy, but not in code, I have no idea what to do. There are ...
[27 replies] Last: Thanks guys, I'm trying really hard to learn this stuff. (by noobplusminus)
College Class In C++
 
Why is it that my only class in C++ in undergraduate college teaches console programming and not Windows or Linux application programming?
[11 replies] Last: Dput wrote: which c++ class is it? the particular name? The cours... (by kingcong)
Retooled palindrome problems
 
Hey. Worlds worst programmer here. I retooled my palindrome, but am still having problems with the if/else statement. I don't get it. I put the if/else state...
[7 replies] Last: Oh, well the q/Q is what I used as a loop to exit the program. Would ... (by jackbruns28)
Algorithm to cout an array in certain order?
 
Basically, I need to compare one cell to all of the other cells in the same array. I have most of the code done, I just need 2 algorithms. I've been using pen a...
[2 replies] Last: If the array is already sorted by model year (according to your descri... (by Duthomhas)
Question regarding while getline loop (simple)
 
Hey all. So I'm just curious if there's a better way to exit this while loop when reading in a string. Essentially, this is how I did it while(getline...
[2 replies] Last: tyty :D (by KvltKitty)
Memory Management - Strings (Help)
 
Assignment - Continue the implementation of the String class. Add each of the following: a. A constructor String (int n, char c) that initializes the string w...
[3 replies] Last: Smac89 & kbw: Thanks for those tips. Line 110 was just user error on m... (by toonhead85)
class members and assignments
 
Hi, im currently making a oregon trail rip-off, but when i try to assign the stats to the characters using the player::make() class-function, only some work, an...
[2 replies] Last: thanks so much! -ascii14 (by ASCII14)
User Input Validation Help?
 
Write your question here. Hi ! I am working on a code that will find the distance from a point on the Cartesian plane to the origin (0,0). As you can see this ...
[no replies]
Event timer
 
hello, I have two questions. What is a good gui for c++ i looked up qt but if there is a better one i would like to know. second which is the main question i...
[no replies]
Dealing with VEERRRYYYY big numbers
 
Write your question here. let's say i design a function unsigned int foo(unsigned int n){ blablablal; } If in main i call the function foo(1293849...
[10 replies] Last: > ^ Yes, in my lecture malloc and free is mentioned. But mentioned it ... (by JLBorges)
February 2014 Pages: 1... 5657585960
  Archived months: [jan2014] [mar2014]

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