General C++ Programming - March 2013 (Page 13)

Math Problem/(Buffer coord to screen coords)vice verca
 
I have a linear buffer coordinate, i am to print onto a screen coordinate. Say maxy = 20, maxx = 10, bufferx = 20, y, x, Buffer coordinates to screen coordinat...
[3 replies] Last: Actually, now this method is no longer relevant. I need a mathematica... (by IndieExe)
by xismn
Inheritance and templates
 
Hello, I've been racking my brains over how I might go about implementing something like this : class CBase { public : CBase() {} void foo(); //Meth...
[2 replies] Last: Thanks for this! Works as you would expect. (by xismn)
error:expected ; before } token
 
#include<iostream> #include<fstream> #include<new> using namespace std; main() { int i,N,C,L,j,k,count; int *p; ifstream filein ("hello.txt"); ...
[5 replies] Last: > Ok then instead of putting break, put continue instead Or just ; As ... (by ne555)
Searching for, and printing values in C++ from a .txt file
 
So I'm doing a kind of banking system. Atm I've got the user able to create an account and set the balance of it, which is written to a .txt file. However, I wo...
[8 replies] Last: Try fixing the errors I pointed out in my previous post. (by AbstractionAnon)
Icon for folder
 
hiiiiiiii everyone Is there any function or manner in cpp help us to introduce and icon to a folder thanks a lot
[7 replies] Last: I know that seams wow, I'am just wondring if there is a maner to do so... (by closed account 28poGNh0)
by sieg
Help making a basic calculator.
 
I'm stuck because I can make the calculator just find but the user will have to press enter after every number, what is s solution to this? #include <iostrea...
[6 replies] Last: I get 101250, using C++ express. (by sieg)
Accessing Struct Data in a Queue
 
I have a queue of structs. I would like to access one of the two pieces of data at the front of the queue that each struct maintains. Here is some of my cod...
[8 replies] Last: I think that works. I could have sworn I tried that originally but I m... (by oudavid1)
Find the minimum data of binary tree
 
I want a recursive function that returns a pointer pointing to the node which has the minimum data in the binary tree. That's what I wrote: struct CP { i...
[8 replies] Last: LOL @ Smac89 It is a basic bstree, other than my 'at-the-time' variab... (by Michaela Elise)
Help with loop statement
 
Hi, I started programming c++ about a week ago and I have reached a stump in the road. Whenever I run the program in the decompiler it closed automatically. I t...
[4 replies] Last: Thanks, it worked! (by Inficard)
Optimized Bubble Sort
 
can anyone help me to optimize this bubble sort program? #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <time.h> #include <cstdlib> ...
[2 replies] Last: I seriocely don't get the need to use sooooo much alocated memory, I m... (by zoran404)
Want to understand aggregation, association and composition
 
Hello, I can't make links how do these three things relate to OOP. Secondly, I can't find enough material on them. I mean, even if you search these terms in wik...
[no replies]
Why
 
Why dose this not work? It is just supposed to open the sound file in my my music folder. #include <windows.h> HINSTANCE ShellExecute( _In_opt_ HWND hwnd...
[no replies]
Solved
 
Solved
[4 replies] Last: This right here is your problem while (sameAnswer && count < QUESTI... (by zoran404)
Very confused
 
In my book Book, Ivor Horton's Beginning Visual C++ 2012 it says that the following is a lvalue reference? const int& refData = 5; Isnt it a rvalue ref...
[10 replies] Last: @cubbi @miinipaa @disch is this a good defination for the difference?... (by Anmol444)
by Kaan
please help
 
Please write a class of a stack that holds int type values and keeps a LinkedList as its main structure. Please help
[10 replies] Last: Try this, I think it works #include <iostream> using namespace... (by toomanystars)
Input/Output Text File Manipulation issue!
 
Hi guys; I was wondering if you can tell me why my output screen for this program does not want to stay open. It only opens for a split of a second and it's gon...
[1 reply] : if (!infile) { cout << "Sorry, Can Not Open The File" << endl; exit (... (by MiiNiPaa)
Help With Executing Multiple Functions!
 
I am fairly new to C++ and am in a Programming I course in school. We have been assigned to create a program that uses multiple functions. The professor has giv...
[1 reply] : line 16 should be: inFile.open(fileName.c_str()); watch those tYpOs... (by Smac89)
by Almrls
Trouble with looping a function
 
With the following code: #include <iostream> using namespace std; bool key = true; char swit; void cont(char ans) { switch (ans) { case '...
[2 replies] Last: Removing = true worked. Thanks so much. (by Almrls)
Question about recursion?
 
Can somebody please explain to me what the output would be if I were to call: m3(5); and also can you explain why? I'm new to C++ and this is confusing me. T...
[3 replies] Last: After posting the question I did run it through a debugger and the out... (by closed account 3UMLy60M)
OOP Question
 
I've been thinking lately with the method I'm using as many people suggest in making a class. Some part of my code look like this : class test_t{ te...
[3 replies] Last: What are you trying to do with it? (by zoran404)
March 2013 Pages: 1... 1112131415... 51
  Archived months: [feb2013] [apr2013]

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