General C++ Programming - May 2013 (Page 11)

Weird Strtok Issue
 
int search(char* keyw) { char* tkn; int tokCnt=0; unsigned char* result; char delims = " ,.:;_\n\r\t*-=()"; /* Tokenizes w...
[6 replies] Last: Thank you. I don't know much about C++, but you have given me good adv... (by knowNothing)
C++ Assistance
 
Hello all, I am working on a project and am having a bit of an issue with one of the requirements. Basically, I have to read a 6 character string input from my...
[3 replies] Last: If function is bool, if something goes wrong, such as, more than 6 cha... (by greenleaf800073)
by RyanV
Binary Search Tree: Insert Function Not Working
 
I am working on programming a binary search tree. The problem that I am having is that my root node doesn't ever seem to actually end up pointing to anything...
[no replies]
Segmentation Fault ostream overload
 
Hello everyone, I' ve seen post on this topic before, but this is a liiiitle different. So the question on the already asked topics is why do I get segmen...
[no replies]
by LunarB
C++ Winsock2 & pthreads: Accepting multiple clients?
 
Hey! So I'm still having troubles connecting multiple clients to my server. To break down what I have going: I have a server that is supposed to accept mult...
[10 replies] Last: How would I use that to accept multiple clients, though? My problem is... (by LunarB)
moving elemnts in an array and displaying
 
This is for a class project. I am having trouble "pulling out" the last element in my array, shifting all the elements back then inserting that last value in th...
[3 replies] Last: Big thanks to both of you. this was very helpful. (by theswellylife)
strcat and char initialized with "" (1,2)
 
Hi, I have a function simplified like this: int main() { char skipped = ""; static char* partitions = { "/part0", "/part1"...
[24 replies] Last: Thanks, Yes, then there are habits about the prefix in increment... st... (by philonto)
I need to stop this
 
#include <allegro.h> #include <cmath> void init(); void deinit(); int main() { init(); while (!key ) { int xpn, ypn, xkn, ykn, d=50; do { sra...
[2 replies] Last: key and KEY_ESC aren't defined anywhere. I'm assuming its defined... (by AdrianH)
Function pointers
 
Hey, can somebody provide me with good references to study Function Pointers? Any Books or website that deals with it in depth and easy to understand.
[3 replies] Last: Mark question as answered. (by AdrianH)
by Zoo
Template class problem
 
Hi. I have encountered a problem with template class. I have made a template class that converts a value into a string, and then made another template class t...
[2 replies] Last: // If it's possible to convert the string to T if ( is >> ret... (by AdrianH)
Overloaded file
 
I used fstream and opened and closed files. I did this so much I overloaded the function. I have many subroutines and need to constantly open and close the file...
[6 replies] Last: Tried my 2nd compiler and it worked. Thnx everyone. (by closed account NUj6URfi)
Software Engineering
 
I'm into my sophomore year of my computer science degree. I want to get into the career of software engineering but I am not 100% sure on how to go about this. ...
[3 replies] Last: Well they're not very many colleges that offer the major and none of t... (by Westonrwright)
class attribute read-only issue
 
My header file: #ifndef OBJECT_H #define OBJECT_H #include <vector> using namespace std; class Object { public: Object(); void u...
[3 replies] Last: By changing, you mean through the Object::update(Object) method? Beca... (by AdrianH)
algorithm complexity?
 
Hi would like to know that my algorithm has asymptotic complexity recursive? regards cronos int solve(pair<int,int> actual) { if(actual.first == PuntoIni...
[1 reply] : This might help you: http://www.cs.duke.edu/~ola/ap/recurrence.html (by AdrianH)
How to put string content into source code?
 
I'm trying to write a program that prompts the user to enter a math expression (i.e 2*x + x*x) and a value of x. Then generate the value of y. My real question ...
[4 replies] Last: If we're talking about evaluating a mathematical expression, then I'd... (by andywestken)
Need help with taylor series assignment!
 
Hey guys I'm having trouble with this assignment for class, can someone please help me out? The assignment is involving taylor series sin(x) and cos(x). It basi...
[1 reply] : Please note, that it is not a homework site. We won't do your homework... (by MiiNiPaa)
initializer_list in VS 2012
 
Hi all, I use Visual Studio 2012 Ultimate as my IDE, and it's great to work with, but I more and more lack initializer lists. Is there some way to solve that? ...
[9 replies] Last: I noticed. Well, I'll just use C::B. (by Fransje)
by kienme
Comparing words with contents of a text file
 
Hi there, I need a little help with my project. I want the user to enter the word and I want to check if it exists in a text file or not. I tried int flag...
[6 replies] Last: Ah! That's done the trick. Thanks a ton :) (by kienme)
how to convert pixel to [-1..1] coordinate in opengl
 
hi how can i convert pixel to [-1..1]coordinate in opengl? witch function? i want to write a program that is work with glutmousefunc(), when i click on the ...
[4 replies] Last: thanks so much (by foozhan)
A safty issue regarding shared_ptr
 
Hi everyone, I have a base class A and a derived class B: class A {...}; class B : public A {...}; Now, in one part of my program, I need to op...
[4 replies] Last: Prefer using std::make_shared() over new I didn't even know this ex... (by mutexe)
May 2013 Pages: 1... 910111213... 47
  Archived months: [apr2013] [jun2013]

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