General C++ Programming - April 2013 (Page 30)

binary search tree problem
 
#include <iostream> using namespace std; typedef struct node{ node*right; node*left; node*father; int height; int key; }node,*pnode; void insert(pnode...
[3 replies] Last: What I mean is that line 23 p1=p; is useless. You passed the argumen... (by ne555)
Command Line Argument problem
 
Hello everyone, I am trying to make an array of size "N" for a school homework assignment involving sorting large arrays. My teacher says to use the command lin...
[4 replies] Last: SO I have to execute my program from the command line to pass in an ar... (by tay1392)
C++ CLI(Windows Form Application) Printing!
 
Hello everybody... im new user here in forum... so i want to ask about printing to the printer using c++ Windows Form Application ..... so for example i want to...
[no replies]
C++11 Thread without waiting
 
I am creating threads in a loop, but i dont want to wait until its finished. How do i do that? void XControl::OnClientConnect() { // [...] other code ...
[2 replies] Last: Thank you for this idea! Works perfectly now. (by Mellnik)
SDL deleting from vector
 
Hi guys, Ran into a bug yesterday and it's really frustrating because the code looks right so I am looking for some help. simple rect collision detection...
[7 replies] Last: In addition I have to do some research on your "smart pointers" http... (by naraku9333)
cout value -1.07374e+008?
 
My program is to calculate the Vector X product using the Direct X Header/ Library Iv'e got it to work something is wrong with the output of the Vectors The...
[2 replies] Last: Ah so that would explain why the value was -1.07374e+008, but where wo... (by Histerial)
by Faint
Errors with using templates
 
Hello, I've written the following code and keep getting the errors: Error 1 error C2244: 'Supermarket<temp>::operator =' : unable to match function definition ...
[11 replies] Last: And next time I'll put the whole code, still a newbie :P (by Faint)
Inheritance
 
how can I make a class non inheritable,,, without using keyword "final" ? class A { // }; A obj; // No error class B : public A { // }; // error ...
[2 replies] Last: Thank yoi Disch) (by Mher594)
Difficulty appending a a local buffer value with a string
 
Please excuse my terminology if not perfect. I'm trying learn how to combine a string value with a local buffer containing time and date. I can't seem to g...
[3 replies] Last: I hope this answers your question. I'm not sure of the limitations of... (by Steve02)
An hard code
 
main(_) {_^448&&main(-~_); putchar(--_%64?32|-~7[__TIME__-_/8%8][">'txiZ^(~z?"-48]>>";;;====~$::199"[_*2&8|_/64]/(_&2?1:8)%8&1:10);} output: !! !!!!!! ...
[7 replies] Last: It actually one of the winners of IOCCC of 2006. Entry named sykes2... (by MiiNiPaa)
by sworld
Lazy copying - deep copy problem
 
Hi, I have a class which is using lazy copying - when a copy constructor is called, it creates shallow copy and when one method is called it creates a deep cop...
[9 replies] Last: @ LowestOne I didn't see your reply until just now. Thanks for the... (by Disch)
simple array, program crashes **HELP**
 
The program will ask the user to enter the class code, name, section, and the names of each of the students in the class. Then the list will appear in the outpu...
[1 reply] : it crashes when name #16 is entered....it should not eaven ask for a 1... (by Neutralityyy)
Keeping types safe
 
I have a function which is passed an unsigned integer. The value of the integer must be zero or ( 1 << 31 ). In order to ensure this happens, I've done this: ...
[no replies]
fscanf
 
Is there any way to store the value of the fscanf(file,"%i",&x)? In my case is 5 and I want to store it in a variable!
[11 replies] Last: Guys, OP is newbie who has been given assignment to work with a functi... (by Duthomhas)
Using file from command line
 
I'm trying to read in a file specified in the command line but I'm having some trouble. The command line entry specifies the inputfile preceded by '<' and the o...
[8 replies] Last: Thanks for your help people, I've got it sorted now. Turns out i don'... (by Crakrjack)
Input of Unkown Size
 
I am solving problem, where I need to perform the same operation of an unknown number of test cases. Input: 10 2 20 3 54 1 Output: 20 60 54 ...
[2 replies] Last: Thank You. Line 4 really helped. (by Script Coder)
I/O Files
 
Hello all, I am reading from a txt. file and have 3 columns of numerical data. I want to sum 2 of the columns and return the total at the bottom of the appli...
[2 replies] Last: I bow to your greatness. That worked perfectly and was exactly what I ... (by ashonk226)
Dev C++ 64 bit.. assembler errors
 
I have C++ code which compiled with an older version of Dev C++ - and ran on Windows 7 .. I have moved to the new Dev C++ 5.4.1 dated 17 Mar 2013.. and compil...
[1 reply] : Inline assembly is not supported when compiling for X64 architecture. (by modoran)
trouble reading .txt into matrix
 
Hi all, Im reading in from a text file that is formatted like this 1 1 1 1 1 1 4 7 8 X 6 1 1 1 1 1 1 5 8 8 1 1 1 1 1 1 1 4 6 7 1 1 1 1 1 X 1 1 3 6 1 1 1 1 1 X ...
[2 replies] Last: I ended up putting the map into an array and the project is all done n... (by Crakrjack)
C++ help with Vectors please. Sorted vector is poof....????
 
Here's my code #include "stdafx.h" //don't worry about this line #include <iostream> #include <vector> #include<algorithm> using namespace st...
[7 replies] Last: It was a typo. I updated my previous post. (by vlad from moscow)
April 2013 Pages: 1... 2829303132... 53
  Archived months: [mar2013] [may2013]

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