Beginners - September 2011 (Page 42)

Adding graphics to a simple program
 
Hi there, I am a beginner in C++ and have created a simple program which works fine. I would now like to add some sort of graphic to the program so it is not ju...
[no replies]
Struct inheritance - (strange?) problem.
 
Hello, when I tried to write two simple structures: BasicNode which store pointer to only one child, and second called CommonNode which contain pointers to firs...
[3 replies] Last: What's your error (s)? Note that this->data = QString("Unnamed Commo... (by closed account zb0S216C)
Need help...
 
What is the equivalent statement for LOCATE (QBASIC) in c++ and what's the syntax of it?
[10 replies] Last: @beginnercode Sorry, I don't use Dev C++, just Microsoft Visual C++ 2... (by whitenite1)
by chrarv
compilation error Vec template class
 
hello to everyone I am tring to compile an example simplification of a template vector class [called Vec] from the book Accelerated C++ Practical Progr...
[11 replies] Last: In instantiation of 'std::back_insert_iterator<Vec<char> >': error: n... (by ne555)
by Ragine
Help?
 
Im trying to compare multiple numbers with another. Like 50 , 30 ,20 ,10 , 70 and find the closest one to 40. Any idea on how i can do this?
[3 replies] Last: That doesn't change anything. Of course, you can do this without secon... (by hamsterman)
Help converting number to Hours/Minutes/Seconds
 
Hi, I'm trying to create a program in C++ that generates a random number, like 173.5 and convert it to Hours/Minutes/Seconds. So it would take 173.5 and give...
[1 reply] : Well I thought about it a bit more and think I got a bit closer. #in... (by Esanders323)
Program won't open file
 
Hi, I am a beginner and have written a simple program that reads data from a file and tells the user what the highest value read in was, and the lowest value re...
[2 replies] Last: No, I figured it out. Thanks (by bballamis)
by Daker3
Reading txt file into Array
 
I'm doing a bubble sort program, but I don't need help with the algorithm. However, I do need help reading a txt file into an array. The file is a bunch of doub...
[1 reply] : The problem is your loop will keep going til 1000 even if your file ha... (by Cruciatus)
Basic of pointer...
 
#include<conio.h> #include<stdio.h> void main() { int x=10,*p; p=&x; printf("%d",&p); printf("\n%d",*p); printf("\n%p",p); printf("\n%p",&p); getch(); } Why o...
[1 reply] : That's interesting because I compiled and ran the same program and my ... (by gdfuison)
by Daggie
Error while returning an object pointer?
 
The code should traverse through a doubly linked list and return a pointer that points to an object node or returns a NULL pointer otherwise. That node that is ...
[10 replies] Last: hello again. It does turn out that you were right in that the issue wa... (by gdfuison)
Please help me spot the logical inconsistency
 
Hi all, First post here. I'm new to C++ but I am picking up things rather quickly. I wrote a program to compute the squares of integers and I'm faced with th...
[3 replies] Last: '100' is too big to fit in a single char. It actually is 3 chars ('1'... (by Disch)
Vector question
 
Writing a program that takes a set of 5 scores displays them in order then when a new higher number is put in replaces the past low number. I want to be able to...
[1 reply] : Can I create a vector that will store both integers and strings, and ... (by shacktar)
Box Office problem
 
A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie distribution. Write a program that calculates...
[2 replies] Last: Ok, I am getting an error now, please help // Hasnain Attarwala // L... (by Hasnain Attarwala)
writing function
 
#include <iostream> using namespace std; double x; double function (x + 2) { if (x ==0) return 1; if (x== 1) return (1/3); else re...
[5 replies] Last: Well, the initial conditions should be the same as the ones in your f... (by m4ster r0shi)
Define
 
<< vs >> a) Give me the formal definition in your words b) definition in layman's terms ex cout << "enter name" << endl; cin >> name ; Like why when there i...
[no replies]
what are the jobs tab in these forums?
 
is this legit? can you really get paid to just send out your source code and get money in return? or are those just a hoax?
[no replies]
Operator in fopen "./"
 
Hi, I am going through a large amount of code and came across this line: debugging=fopen("./debuggingtraj.txt","w"); and am searching for where this ...
[1 reply] : . refers to the current working directory, which has nothing to do wit... (by Athar)
by efigen
calling text file in command line
 
Heres my question, we are required to call any text file using the command line, without using the string class #include<string.h>, so i cant use getline(). How...
[14 replies] Last: nevermind i figured it out, YAY!!!!!!!! (by efigen)
find() function not working
 
So I'm having trouble understanding why the find() function isn't working. I am getting the error "Member reference base type 'char *' is not a structure or uni...
[3 replies] Last: If npos is still not declared, try string::npos ... (by shacktar)
What's width() funcion in cout
 
Hi, I know use a width() function with cin, to define a maximum size of chars. Ok, and with cout? Thanks.
[no replies]
September 2011 Pages: 1... 4041424344... 48
  Archived months: [aug2011] [oct2011]

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