General C++ Programming - October 2012 (Page 20)

python vs C++
 
I am currently running a code using C++ (for my research) the code is pretty complicated, it deals with FFT, matrix inversion multidimensional fitting, .. Is i...
[3 replies] Last: Is it easier to convert(!) to python for that kind of programming?! ... (by helios)
FILE* in c++ ?
 
Hi, I'm working on a school assignment and I've run across what I believe to be a conflict in the requirements. The assignment states "You must only use C++ sty...
[6 replies] Last: I think it was honestly just a mistake. This assignment is supposed to... (by rektiphyr)
Asteroids Ship Movement, Momentum Help.
 
I'm attempting to get a spacy movement system in an Asteroids Clone, I.E you don't instantly stop if you don't keep moving. That part 'works' but the actual mov...
[10 replies] Last: yeah, that's how SFML has it set up, I'm not sure of the reasons behin... (by Zephilinox)
debugging issue
 
I am getting this message when I run the debugger: Unable to start program'I:\bst\binsearch\Debug\binsearch.exe'. The system cannot find the file specified. I...
[1 reply] : "The system cannot find the file specified" (by Alx101)
by su li
this pgrmming need to use "switch" but mine is not work it.why?
 
#include <iostream> #include<cmath> using namespace std; int main() {int x; char time, charge; cout<<"case 1<=2hours,case 2<=3hours,case 3<=4hours,ca...
[2 replies] Last: These are your variables: char time, charge; This line makes no sense... (by rektiphyr)
destroying a weldjoint created in one method in another
 
I am trying to make a method (destroyWeldJoint) that destroys weldjoints from a copied set. The joints were originally created in another method (createWeldJoin...
[no replies]
Pyramid
 
#include <iostream> int main() { int input_rows, rows, output_spaces; std::cout << "Enter the number of rows: "; std::cin >> input_rows; output_spaces = in...
[5 replies] Last: ok so u want it to be centers right? its actually very simple... i exp... (by SwatSid)
by Vy C
Help with break;
 
I get this error when trying to break out of my else statement: 47:9: error: break statement not within loop or switch Here is my code, what am I doing wr...
[4 replies] Last: Change break to exit( 0 ) and include header <cstdlib> (by vlad from moscow)
by dalawh
Parameters
 
Some important parameters for functions are poin void somethingHappens (int *a); //pointers void somethingHappens (int& a); //address void somethingHappe...
[8 replies] Last: @Royeiln What other problems do you still have? (by dalawh)
by Azuki
How many instance variables does dObject have after the code in Line 26 is executed?
 
#include <iostream> using namespace std; class BClass { public: int x; double y; public: virtual void print() { cout << "Result of additon: "...
[1 reply] : 1 and dObject is a pointer to it. (by TheIdeasMan)
by SMA01
Why isn't my algorithm working?
 
I have to write a program validating credit card numbers using Luhn's algorithm. I am having trouble getting my last function to work. For a credit card number ...
[1 reply] : Putting it in code tags to help readabilty.... bool isValid(string... (by Kart)
Print and Insert Binary Search Tree
 
When I try to print out the tree it doesn't. I don't know if it's the insert function or the print function and I've been messing around with it for a good two ...
[4 replies] Last: After some editing there is something wrong with the calling of remove... (by RaineShadow)
by Bosse
Wchar_t and fwrite help!
 
Hello people of cplusplus.com! I'm making this thread to ask you guys for some help. What I'm trying to accomplish is making a console application where t...
[6 replies] Last: Oh alright! I will try it out and see if I can figure this out! Thanks... (by Bosse)
++ + ++
 
Hi. Why does the following code print 2 2 ? int a=0, b=0 ; b=a++ + ++a; cout << a << ' ' << b << endl; while(1); return 0; ...
[6 replies] Last: http://www.stroustrup.com/bs_faq2.html#undefined Last Example... (by majidkamali1370)
Find a vertex ordering of a finite graph G
 
I've tried to implement this algorithm in C++ but it has some problems. I need some advice how to get it work faster and propertly. Algorithm As Batagelj & Z...
[no replies]
SDL Help
 
Hi guys, Looking for a little help with SDL. I am able to do some simple SDL programing such as moving an image, hit detection etc. However, I have been ...
[5 replies] Last: Aahhhhh, you're probably right. Looks like I completely understood. ... (by Disch)
by shafh
Let header files include each other
 
Hi. Im new to C++ and have currently a problem. One class A contains pointers to another class B, but i now also need to have pointers from class B to class...
[3 replies] Last: The article ne555 linked to is definitely worth a read. Though to mor... (by Disch)
Trying to put this into one line
 
Okay so I'm reading bytes from an array in memory like so: int ReadInt() { unsigned char data = { _Buffer[_Index++], _Buffer[_Index++], _Buffer[_Index+...
[2 replies] Last: I'm sorry, but I'm not sure what you are talking about. It works fine ... (by DangerMonkey69)
by veeyik
Valid triangle?
 
can edge 1 2 3 form a valid triangle? and 1 2 1.
[4 replies] Last: veeyik Well think about it. What are the conditions for the a valid... (by TheIdeasMan)
by SMA01
Loop and Luhns algorithm
 
I'm using Luhn's algorithm for a credit card program. Part of the algorithm requires me to double the number that's two places from the right of the credit card...
[5 replies] Last: I was assuming when you said "I don't really know how to put that into... (by elementary)
October 2012 Pages: 1... 1819202122... 50
  Archived months: [sep2012] [nov2012]

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