Posts
 
Reputation
Joined
Last Seen
Ranked #434
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
88% Quality Score
Upvotes Received
8
Posts with Upvotes
8
Upvoting Members
7
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
6 Commented Posts
~48.8K People Reached
About Me

Almost Uni Student.

Favorite Tags
Member Avatar for somename

Hello. I am trying to find out how to write a function to replace a string in a text file. So far i got this: find -> is a word i am looking for replace, rep -> new word, f1 -> my file. And i'm stuck with that piece of …

Member Avatar for deceptikon
0
3K
Member Avatar for JuliaCplus

I need to write a program to enter 3 names then display the name is aphabetical order. Example Jessie, sam, and chris. the program should display: chris Jessie sam Please help

Member Avatar for NathanOliver
0
906
Member Avatar for omarelmasry

I am trying to use FMOD library in a console application Visual c++ project.... But I can't really get it to work I will tell u exactly what i did... First, I added the following files to the project folder: [B]fmod.h , fmod.dll, fmod_errors.h , fmoddyn.h , fmodvc.lib , wincompat.h …

Member Avatar for william90049
0
311
Member Avatar for homeryansta

[CODE=C++]void List::remove_last() { if(first == NULL) { first -> data = ' '; } else { Node *newnode; newnode = new Node; newnode = NULL; newnode -> data = last -> back -> data; last = newnode; } }[/CODE] am I doing something wrong? I'm trying to remove the end …

Member Avatar for sunn shine
0
171
Member Avatar for Clockowl

Hey guys, Here's my story: I had a HDD: Data, ~300GB I created a partition for another OS I'm done with the OS, remove the partition Now, it shows up as unallocated, and I can't find a way to merge it back to the drive it belongs to! A screenshot …

Member Avatar for Rik_
0
149
Member Avatar for jadedman

do you know where to find GL/glut.h code? i only found gl.h, glaux.h and glut.h in some links. can you help me?

Member Avatar for od3_85
0
203
Member Avatar for Clockowl

Hey guys, I know the title isn't possible, but I'd like to here how you'd do it then. Suppose we have this code: [code=cpp] Class Foo {public: int x; }; //somewhere in the code.. int main() Foo one, two; one.x = 10; two.x = 20; Foo *a = &one; Foo …

Member Avatar for Narue
0
168
Member Avatar for Clockowl

Hey guys, I have this code snippet: [code=cpp] template <typename ElementType, typename CompareClass> struct Delegate { virtual bool geef(const ElementType &element){ pair <set<ElementType, CompareClass>::iterator, bool> ret; //this is line 196 ret = elements.insert(element); //197 return (ret.second); //198 } virtual void output() = 0; set<ElementType, CompareClass> elements; }; struct ArtiestenPrinter : …

Member Avatar for Clockowl
0
216
Member Avatar for Clockowl
Member Avatar for drjay1627

can someone please explain to me how read write work in sock programming. my assignment is to run a server and client. the client ask the server "who are you?" and the server replies with the servers name and date and time. i cannot post my whole code here as …

Member Avatar for dkalita
0
235
Member Avatar for Clockowl

Hey guys, I'm trying to create an MSCache (2 times MD4) cracker. I took the RFC thingy and implemented it in a cracker which is.. fast, but not as fast as I'd like it to be. So I searched a bit and stumbled on MDCrack, which claims it can do …

Member Avatar for dzhugashvili
0
456
Member Avatar for Zcool31

Hello everyone! I am trying to use polymorphism to have a little physics simulator that draws objects to the screen. Each object has properties like mass, friction, position, velocity, acceleration and such similar things, as well as a pointer to a SHAPE object which describes the shape of the object. …

Member Avatar for Zcool31
0
219
Member Avatar for Clockowl

Hey guys, Can I tell istream to ignore ALL the characters until the delimiter char? It can be done with a loop but it's kinda weird I can't tell istream "discard until this char" imho, so maybe there's an hidden option somewhere. Thanks in advance!

Member Avatar for Narue
0
274
Member Avatar for llemes4011

Hi, I have another question. This one is about header files. I have a header for a player and the opponent of my battleship game. They way I have it set up, the opponent needs a player object to make a move, and vise versa. This is what i have. …

Member Avatar for llemes4011
0
148
Member Avatar for anilopo

after i've got this error: pure virtual method called terminate called without an active exception Abort (core dumped) i searched and found that it is probably because i'm calling to a pure virtual function from a constructor. well, yes, i'm doing that, but - - what is wrong with that? …

Member Avatar for ShawnCplus
0
249
Member Avatar for Clockowl

Hey guys, So I have compiled my first home-written static library (named PixGUI) that happens to call OpenGL functions. However, I noticed that when compiling (using MinGWs GCC with Code::Blocks project set to "static library") it doesn't matter whether I supply the linker with libopengl32.a or not, it simply compiles …

Member Avatar for Clockowl
0
199
Member Avatar for Clockowl

Hey guys, Below code isn't working as I expect it to do. I expect it to read all params when 6 are given, buuuuuuuuuuuut it only reads one, the rest remains zero. It does enter the case, but the stringstream buf seems empty. What am I doing wrong? [code=cpp] #include …

Member Avatar for Clockowl
0
161
Member Avatar for Clockowl

Hey guys, What am I doing wrong here? sss.hpp [code=cpp] #include <fstream> #include <string> #include <map> namespace sss { using namespace std; class node { public: multimap<string, string> values; multimap<string, node> children; string &value(const string name, size_t index = 0); node &child(const string name, size_t index = 0); private: template …

Member Avatar for Clockowl
0
679
Member Avatar for Clockowl

Hey guys, How would I partially specilize a template in a manner as below? Is that even possible? I have these two functions: [code=cpp] bool node::read(const char *filename) { ifstream f(filename); if (!f.good()) return false; bool success = read(f); f.close(); return success; } bool node::write(const char *filename) { ofstream f(filename); …

Member Avatar for Clockowl
0
506
Member Avatar for Clockowl

Hey guys, I have a class with a friend function and a member function with the same name. Calling the friend function from the member function gives me an error: it looks for <classname>::<function> while the friend function is of course simply <function>. In this case, MinGW GCC says: [code] …

Member Avatar for Clockowl
0
173
Member Avatar for Clockowl

Hey guys, With this defintion: sss.hpp [code=cpp] #include <fstream> #include <string> #include <map> namespace sss { using namespace std; class node { public: multimap<string, string> values; multimap<string, node> children; string &value(const string name, int index = 0); node &child(const string name, int index = 0); //... }; typedef pair<string, string> …

Member Avatar for ArkM
0
90
Member Avatar for ShadowScripter

I stumbled upon another what I think is initializer, like int and char, named [B]HANDLE.[/B] It's also used when creating an application, I've browsed the net and found that it is a sort of pointer to an object that can change without me knowing it... eh... It wasn't really that …

Member Avatar for ShadowScripter
0
101
Member Avatar for jomacho

Hi, this is my first post here. The fact is i'm not a programmer and i need help. I have a software that i need to solve a vehicle routing problem for my thesis. But i only got the source code for it, one header file and 6 cpp files. …

Member Avatar for mvmalderen
0
123
Member Avatar for Clockowl

Hey guys, I got this code, and I can't get it to compile, no clue what I'm doing wrong. [code=cpp]#include <iostream> #include <vector> #include <iterator> using namespace std; template <class T> void kill_dupes(vector<T> &x){ vector<T> y; for(vector<T>::iterator it = x.begin(); it != x.end(); it++){ if(find(x.begin(), x.end(), *it) == x.end()){ y.push_back(*it); …

Member Avatar for siddhant3s
0
2K
Member Avatar for Stefano Mtangoo

Just a curious Question. What do you prefer, QT or wxWidgets? How do compare the two in terms of: 1. Nativity 2. Easiness to learn 3. Documentation 4. Weight (The size in MB) 5. Licencing 6. Any other factor(AOF) Thanks all!

Member Avatar for NicAx64
0
429
Member Avatar for Clockowl

Hi guys, What am I doing wrong here? Program dies on me @ merge(). :( [code=cpp]#include <iostream> #include <vector> using namespace std; int main() { int afrom[4] = {0,0,1,2}; int ato[4] = {1,2,3,4}; vector<int> from(&afrom[0], &afrom[4]); vector<int> to(&ato[0], &ato[4]); vector<int> length; vector<int> all_nodes; sort(from.begin(), from.end()); sort(to.begin(), to.end()); merge(from.begin(), from.end(), to.begin(), …

Member Avatar for Clockowl
0
119
Member Avatar for ihatehumans

As part of an assignment I am creating a class to handle rationals with numerators and denominators, overloading the operators for cin and cout, as well as +-*/. So these are the functions for those operators, now where exactly should I include these in my class? [code] Rational addition(Rational a, …

Member Avatar for siddhant3s
0
202
Member Avatar for ShadowScripter

Bah, once again I am beat by the computer logic... Anyone have an answer as to why it gives me an error: "Expected a constant expression at msg" Here's the code, [CODE] const int INFOWND_SIZE = 4; int msg_length[] = "Message"; double calc_amount = (double)msg_length/(double)INFOWND_SIZE; int msg_amount = (int)ceil(calc_amount); char …

Member Avatar for ShadowScripter
0
701
Member Avatar for Usura

Hey, im trying to delete an element of an array of pointers of a class, how can i delete just a single element? my code is basically this... n =8; ClassName *newName; newName = new ClassName[n]; how would i delete for example, element 3, while being in that element... if …

Member Avatar for mvmalderen
0
79
Member Avatar for SmokyMo

i am new to c++ and wonder about how i create a file for example string flight; cin>>flight; flight=flight+".txt"; ofstream myfile; myfile.open(flight); instead of having a fixed name like myfile.open("file.txt") but it doesnt work , are there elegant solutions to this problem i have. all the help is appreciated.

Member Avatar for mvmalderen
0
85