Beginners - July 2015 (Page 25)

How do you save data in the program itself?
 
Is there a way to actually save data in the program itself without having to output the data to a separate text file?
[2 replies] Last: The short answer no. When running a program, modern operating syste... (by AbstractionAnon)
by JAJA19
HOW TO DISPLAY FILENAMES
 
i have a simple program and the output is this: Enter name: ENter age: enter filename for ages enter fiename for names: display all age: ex: ag.txt ...
[1 reply] : To start, Look up cout and cin. (by SamuelAdams)
Question Regarding Pure Virtual
 
I am currently studying off a book and I believe I am following the exact syntax that the book provides. However, the code is giving me an error message and I'm...
[1 reply] : Add void before draw() on line 12. (by coder777)
How to pass a const reference to the same type pointer?
 
Inside a class, I have a member function and a member varaible. the variable type is : typeA *a the member function is: void set(const typeA & refA) { ...
[2 replies] Last: Storing a raw pointer is perfectly fine, if a. the object holding the... (by JLBorges)
by h4ever
Make this working: change color of border
 
I have searched how to change color for control and found this post: http://stackoverflow.com/questions/13579136/edit-control-border-and-wm-ctlcoloredit Here I...
[1 reply] : In order to use a brush or a pen you need the function SelectObject(..... (by coder777)
Looping Switch problem
 
Hey everybody, C++ beginner here. I'm trying to get the following code to loop back to the beginning and repeat the user input/results, but it just repeats ...
[3 replies] Last: Thank you both for taking time to reply. The link provided helped make... (by nikkodomius)
Creating a box with lines outside the menu
 
Hi, I'm trying to create a menu and I want it to be inside some lines so it looks cool, but how do I do it? I know the for loop would be great for it, but I don...
[2 replies] Last: Thank you! (by Arturofm)
Can someone explain to me how exactly this program works?
 
I know it goes through the Fibonacci sequence listing 16 Fibonacci numbers, more specifically I want to know, how this program works, exactly how the compiler w...
[10 replies] Last: How can this sequence be archived then if n is getting incremented by... (by xismn)
by tedk
destructor executes while name still in scope?
 
Why does this code cause a crash? As it happens, the call to equal finds 'items' already deleted (what am I missing?). Thanks for any help. class X { ...
[2 replies] Last: thanks much (by tedk)
by Cyse
inputting numbers while maintaining the largest and smallest throughout
 
Write your question here. hi guys, I bought this book C++ programming: principles and practice using c++. now, ive been trying to work through the drills ...
[9 replies] Last: Did you look at the http://www.cplusplus.com/reference/limits/numeric_... (by keskiverto)
Collision Detection Only affects last element
 
The collision detection that I have implemented only affects the last element of the vector container, and nothing else. Here is a sample program of what I am t...
[4 replies] Last: Thanks for the help, James2250 and Zhuge, you guys have been a huge he... (by Student555)
quick question
 
Hello, i'm working on data structures and linked lists, and for the most part i am understanding these concepts. My question is, what exactly is the best way to...
[3 replies] Last: getNewNumbers() looks a lot like a constructor and increment() looks a... (by dhayden)
i can't return the value!!!?
 
I'm trying to make a password generator using a class just to make things more organized. There was no problem when there was no class. but since I tried to m...
[6 replies] Last: I got it thank you (by isaacthebro)
by Filorn
snprintf and warnings
 
There are two warnings at the lines 4 and 5: deprecated conversion from string constant to 'char*'. Please help me,i don't know what it means. P.S. don't look ...
[1 reply] : type of string literal is const char which can be converted to co... (by MiiNiPaa)
by Filorn
sprintf
 
there are two errors at the lines 4 and 5: invalid conversion from 'const char*' to 'char' [-fpermissive] #include <stdio.h> int main() { char s1 ; cha...
[3 replies] Last: ok thank you very much, now it goes (by Filorn)
Separate program tasks
 
***Edited*** I wanted to make a timer or some number (int) that would decrease in the "background" while the quiz is going on and the user is answering some qu...
[3 replies] Last: Thank you very much. (by PhoenixX543)
So do-while loop ignores nested while loop?
 
So, I am in a intro to C++ class right now. We are learning and working with loops and this is an assignment I did. Everything is fine, but I wanted an option t...
[4 replies] Last: No variable (except again ) are used outside the loop so you could ju... (by Peter87)
by JanoOr
Passing child member functions to other classes
 
Hey, I have a question depending the passing of a child member function to a another class method. In the follwing I tried to show the used code structure. The ...
[1 reply] : Passing a pointer to the derived class member function is unnecessary.... (by JLBorges)
parameters in function
 
Hi, I just wanna ask about the parameters in functions. I'm currently studying the code i got from other site about quick sort algorithm. There is some code i d...
[4 replies] Last: #include<stdio.h> void quicksort(int array , int firstIndex, int las... (by closed account zwpL3TCk)
Is there a more succinct way to use toupper? to make one char uppercase in string?
 
I feel like this could be written with out declaring a char variable? or no? #include <iostream> using namespace std; int main() { std::stri...
[5 replies] Last: looks like it was deleted :) (by Bdanielz)
July 2015 Pages: 1... 2324252627... 33
  Archived months: [jun2015] [aug2015]

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