General C++ Programming - October 2013 (Page 6)

pointers and references
 
In the program below, we copy a reference from cDerived to rBase with "Base &rBase = &cDerived;" But why doesn't it use a pointer instead? Wouldn't it make more...
[1 reply] : In function ‘int main()’: 18: error: invalid initialization of no... (by ne555)
Error using templates
 
Stack<Node> stack; //Gives Error. Stack<Node<int>> stack; //gives Error. WHAT TO DO??? Error: D:\VC 6.0\32\Expression Tree.cpp(163) : error C2955: 'Node' ...
[3 replies] Last: Just to clarify, the issue arises because many old compilers think >>... (by Catfish4)
Ascending Cirles Radius
 
Im supposed to create an to array of eight Circle objects initialized with the following radii: 2.5, 4.0, 1.0, 3.0, 6.0, 5.5, 3.5, 2.0. Then use a bubble sort t...
[no replies]
On C++ ABI
 
I think that every one know how is difficult write a shared library in C++ that works across different compilers. This is due the fact that C++ (and C) doesn't ...
[1 reply] : I don't understand your point and I think you're incorrect on certain ... (by closed account S6k9GNh0)
by saim98
Arrays
 
Hi friend, I am trying a programme with that takes tree arrays of same even lengths and adds the values at odd indexes and save at even index of 3rd array and...
[3 replies] Last: ok,that the code #include<conio.h> #include<stdio.h> #include<iostrea... (by saim98)
by Swirly
Dijkstra's Algorithm producing incorrect results
 
In this implementation of Dijkstra I am trying to read a file in and apply the algorithm to it. While it does run, it does not produce the expected output. It...
[1 reply] : for(std::size_t i=0;i < list .size()-1;++i ) //line 60 ¿why -1? [c... (by ne555)
2 / 5 Byte Code Hopping (Detouring)
 
Hi, I am trying to detour GetASyncKeyState, at first I thought I just need to djmp 5 bytes into the function which would be fine but I have tried this but u...
[1 reply] : BUMP. I have gotten this working almost; SHORT emuGetAsyncKeyState... (by nominal)
Help on Classes
 
so i need help in declaring a display function prototype only that displays a student test scores in the format (student name tab number of scores tab test sc...
[2 replies] Last: ah ok thank you n.n (by azntrindo)
ofstream troubleshooting
 
I'm having trouble with my code outputting to a file. It was doing fine before, then it recently just quit outputting whenever I run the program. Am I missing s...
[4 replies] Last: Calculation.h #include <iostream> #include <fstream> using namespace... (by Forbaken)
Is multi-threaded programs just programs with multiple functions
 
Hi, Cannot fully wrap my mind around multi-threading in C++. All the examples I see just look like the same programs I've been writing just that main() gives...
[5 replies] Last: You probably already know this, though it is also notable that threads... (by closed account 9wqjE3v7)
Dice (with varying number of sides) program: to calculate percentage of results
 
I am trying to code and compile a program that requests a uses to first inpu the number of sides they wish for a dice to have and secondly input the number of d...
[5 replies] Last: Thank you ne555 and Albatross! I made and tried the changes you both s... (by bennyjammin)
Print all usernames after registering with txt
 
this is my code, the program has to ask for the number of usernames I want to create, then you type the username and password. after you do it 4 times (maximum)...
[1 reply] : For loops need to have semicolons instead of comas. As for password ma... (by Albatross)
How to use function name as parameter?
 
I have a class as below: // RemoteControlMonitor.H typedef void (*keyaction)(unsigned int key); class RemoteControlMonitor { private: keyaction rph; ...
[1 reply] : It's not obvious what line the error message is referencing. I don't ... (by kbw)
by jamjam
Use find function to search for a line in a text file
 
Hi all, I'm trying to make a program that will search for a line in a text file using a non default delimitor at the start of the line. An example line in t...
[2 replies] Last: Thanks for reply will look into this now (by jamjam)
regarding C++ binary
 
Hi All, I have one doubt regarding binary... When I write a c++ program then I comiple it and once my binary is ready and then I run it and provide what conso...
[1 reply] : Here is a simple example: #include<iostream> int main() { int n, ... (by Mats)
by yhu420
C2146 and C4430 errors
 
Hello everyone, Today I started coding when suddenly these scums of C2146 and C4430 got me in troubles. I tried to avoid them using my powerful Google skills b...
[10 replies] Last: No problem and don't worry about making some mistakes or bad designs w... (by closed account 3qX21hU5)
Hints to increase performance, and some GLEW issue.
 
Hello everyone! It has been a while! So, I am working on this somewhat large game project (2d using both SDL2.0 and OpenGL 2.1). Since a while, everything has b...
[9 replies] Last: Tried... didn't work =(. And thanks for dedicating some of your time t... (by CPlahPlahLearner)
by bpince
expected initializer before '*' token.
 
Ok, so i've been looking at this for a while now and can't figure out what is wrong, the error i am getting is: BtNode.template:75: error: expected initializer...
[3 replies] Last: You don't have typename BTNode, so you cannot have pointer to such typ... (by keskiverto)
I want to code this program without using "goto" statement
 
Hi guys this is my first post here. I have coded a perfectly working program. But my teacher says that you should code it without using single "goto" statement....
[10 replies] Last: Thanks Albatross for still replying because I thought this was over.... (by Silver Falcon)
by AceK
WHERE CAN I HOST MY SERVER APP?
 
hi everyone, i hope all is well. ok here is the story. i created a client-server app for me and my collegues at work, its basically a chat app. the thing is i d...
[1 reply] : Dedicated server ? But perhaps you might want ask this at Lounge as th... (by rmxhaha)
October 2013 Pages: 1... 45678... 46
  Archived months: [sep2013] [nov2013]

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