Beginners - April 2014 (Page 60)

can't you explain me what wrong with my string??
 
it had problem with the second object! i can't input member u of the second object; //check.h; #ifndef CHECK_H_ #define CHECK_H_ class check{ publi...
[2 replies] Last: my problem like this: Enter u:char Enter v:1 Enter u:Enter v:1 <=== h... (by badstudent314)
Displaying character arrays
 
Hello everyone, This program asks the user to enter a number. These number corresponds to the number of 'words' that the user would like to store on a .txt ...
[no replies]
assignment expression
 
I have to do this for a practice assignment but i missed the class where it talked about it, can anyone help me? Write an assignment expression to increase th...
[6 replies] Last: thank you so much (by ayagomaa)
by Alby94
weight's Pointers
 
Why the first weighs 4 bytes while the second weighs 8 bytes?? int* p = new int(8); cout << sizeof(p) << endl; cout << sizeof(&p) << endl;
[2 replies] Last: &p gives a pointer to the pointer p so both are actually the size of p... (by Peter87)
Structs & Vector problem
 
Greetings, so I have a problem doing this. It gives me these errors: "IntelliSense: class "VendorRequirement" has no memeber "end"" "IntelliSense: class "Vendo...
[2 replies] Last: I'm such an idiot. Thank you, I have been stuck on this for an hour. C... (by Hunniche)
by sky3
Deleting the nth node in a list
 
So im having the problem of not knowing how to figure this out. I cant seem to find what i is equal to in the attached pre-coded programs so im assuming they se...
[3 replies] Last: Anyone? (by sky3)
File Handling C++
 
Hello all, I am writing a string of characters using character arrays only. For instance, it asks the user for how many records you want. Say 3, it can vary....
[4 replies] Last: I mean, the data will be written to a txt file. Once we write, then w... (by closed account oy721hU5)
Making a loop with input
 
I am using microsoft visual studio 2013 console application and what I am trying to do with my code is say "Hello" and if the user types "Goodbye" then the prog...
[3 replies] Last: do you know why when I have just cout<< "Hello"; my window will clos... (by AbstractionAnon)
2 questions, array and looping
 
First question The code was working just fine until I started to do some tuning to my program. I added the array string item {"", "", "", "",.....} When ...
[8 replies] Last: If cin is invalid or itemPrice is <= 0, you will never exit the loop a... (by AbstractionAnon)
by dnulho
Finding size of passed array
 
I need to find the size of an array that is passed into a function. http://www.cplusplus.com/reference/array/array/size/ shows the member function that should b...
[1 reply] : That's a different type of array. I'm typing on a phone, so it's hard ... (by BlakeK)
Help with random command.
 
Hello everyone, im doing this tic tac toe program for my class... it is done, but the last requisite is that the first move must be define randomly, and i dunno...
[3 replies] Last: All the information you need is in the link mutexe provided. You ... (by AbstractionAnon)
by Alby94
Pointers
 
Why these addresses are different? int* p = new int(8); cout << p << endl; cout << &p << endl;
[1 reply] : p is the address to the new integer that has the value 8. &p is the ad... (by Bourgond Aries)
by OUIJ
Trouble with multiple polymorphism classes
 
Not sure if this is even possible, but I am writing a card game hearts where I want a base class called Player that will hold all the variables/vectors for each...
[12 replies] Last: > Was your point that my suggestion would not allow for adaptive strat... (by ne555)
by glfl
How can I split a string into string vector with \n?
 
Well I want to split a string into a vector string std::string frase = "My Name \n is something"; std::vector<std::string> lines; std::string break...
[3 replies] Last: "/n" is not a newline character, it's a / character followed by an n c... (by Disch)
inputting numbers within a class
 
I was wondering how to input an object's values for a Cartesian class. Would this involve overloading the input function, or would it be something else?
[3 replies] Last: Would I put that segment of code in the main function then? That de... (by AbstractionAnon)
Deriving classes
 
I have to derive a class named box from a class named rectangle. How exactly would I go about doing so?
[2 replies] Last: Thank you! (by lizardqueen)
How can you put a range between 2 numbers in C++?
 
Hello, I am a beginner in C++ and have been practicing for about a week.. --------------------------------------------- This is a truly basic question.. How ca...
[4 replies] Last: Oh.., Okay read about the 'and' operator many times, but didn't realiz... (by friedPotato)
by rubito
Dynamically allocated arrays
 
I'm writing a program for a class and I'm stuck trying to figure out how to implement the following function private members: stack<T*> pointers Every...
[2 replies] Last: I guess what I actually needed for this program was to simply write ... (by rubito)
sudoku Help
 
Hey guys im new to C++ and well at the moment i have read in a sudoku puzzle that contains numbers and 0's and integers that are not assigned for a completed pu...
[3 replies] Last: You need to think about the layout differently. Sudoku is a 3x3 grid... (by AbstractionAnon)
by rubait
change position
 
I want to print this triangle in the middle of console window. I used gotoxy function but it only changes the position of first line of output. Any help will ...
[2 replies] Last: Thank You Sir (by rubait)
April 2014 Pages: 1... 5859606162... 67
  Archived months: [mar2014] [may2014]

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