Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
79% Quality Score
Upvotes Received
23
Posts with Upvotes
20
Upvoting Members
15
Downvotes Received
6
Posts with Downvotes
6
Downvoting Members
4
14 Commented Posts
0 Endorsements
Ranked #417
~71.7K People Reached
Favorite Forums
Favorite Tags
Member Avatar for SoftEngGroupE

If you have a sufficient version of microsoft visual studio you might be able to use the CImage class [URL="http://msdn.microsoft.com/en-us/library/d06f3fhw(VS.80).aspx"]http://msdn.microsoft.com/en-us/library/d06f3fhw(VS.80).aspx[/URL] however, express doesn't have this. Otherwise it is a messy procedure as there is more than one jpeg encoding you probably will need to read up on bitmap headers or …

Member Avatar for palanethra.ag
0
625
Member Avatar for sjcomp

With template code you have to be careful on relying on the compiler. You can have broken code that the compiler does not complain about. Until you instantiate a class you cannot be sure that you have no conflicts. Your singleton method seems a little unusual to me it may …

Member Avatar for madGambol
0
246
Member Avatar for Jfunch

Hi i have only skimmed your code but there are a couple of things that stand out as potential problems 1: in remove number: with the first for loop you want the original size not `size -1`, otherwise, if you try to remove the last number in array it won't …

Member Avatar for tetron
0
144
Member Avatar for raseru

It is windows games programming books and articles that probably have the cleanest explanations of what you want to know. There are ways to short cut building a window, depending on the version of visual studio you use. but it is worth knowing how to construct a window without any …

Member Avatar for Frederick2
1
952
Member Avatar for CppBuilder2006

I'm not sure what the problem is going to be explicitly, but you might want to try adding paint() on activate aswell as on paint itself. I remember having an issue with when the window was drawing with VIsta but went away when I used a different approach. You could …

Member Avatar for CppBuilder2006
0
150
Member Avatar for jonymanolo
Re: HELP

[QUOTE=jonymanolo;1191248]is posible expalin my for what use %s in a code line [CODE]cmdLine.Format("\"%s\" \"%s\" %d %s %s %s", playerFile, moviePath, 10, cameraName, selectDate, movieID);[/CODE] i need now how works this code line[/QUOTE] It is used as a placeholder to substitute values into the place of: so the first %s is …

Member Avatar for tetron
0
86
Member Avatar for rtllz

[QUOTE=rtllz;1181687]I'm confused as to where im supposed to put the the location of the file such as C:\\Documents and Settings\\user\\Desktop\\myfile ??[/QUOTE] you will need a file extension too. the double [icode]\\[/icode] are needed for the direct string input but if you [CODE] std::string location = "C:\\folder1\\folder2\\my_file.txt"; std::cout << location << …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for loadload

As salem stated you are asking for an input of a char which is a sinlge digit or letter. so this can only give one letter at a time however, you are also using a while loop so you are getting first [CODE] char digit; int count(0); while(cu != -1) …

Member Avatar for tetron
0
119
Member Avatar for spetsnaz26

you are very close to getting ti working the problem is how you are converting an [icode]int[/icode] to [icode]char[/icode] assuming that you are only going from 0 to 9 you can have [CODE] //this is either the relative or absolute file path std::string base_file = "data"; std::string after_number = ".txt" …

Member Avatar for spetsnaz26
0
251
Member Avatar for yaoc1987

[QUOTE=yaoc1987;1181667]im calling this function from main bin_p.binary_print(outs, n); ^that is in int main() void binary_print(ostream& outs, unsigned int n); ^this is in the header file [CODE] void rec_fun::binary_print(ostream& outs, unsigned int n) { if(n < 2) { cout << n << endl; } else if(n >= 2) { binary_print(outs, n/2); …

Member Avatar for vbx_wx
0
134
Member Avatar for KBL

[QUOTE=KBL;1171492]KB.cpp(18) : error C2447: missing function header (old-style formal list?) [CODE] public: Password(void); [/code] [/quote] I would not expect to see [icode]void[/icode] void being used as a parameter [icode]()[/icode] is standard. but what I don't see is a definition of [CODE]Password::Password() { } [/CODE] and the compiler might be complaining …

Member Avatar for KBL
0
25K
Member Avatar for B1GGS

caveat: This code is doing lots of things that look messy. Especially for the error that you are unfamiliar. Your error means that you need the .h file or at the top with somting like [CODE]int GenerateRandomValue(int v1, int v2);[/CODE] You will also need the definition of the function at …

Member Avatar for tetron
0
338
Member Avatar for Pelle_3

Without seeing a full example, it seems odd behaviour. As a first thought, I assume that you are talking about opening a file that is acting as a database and you want to move to the first entry. you might try explicitly adding the [icode]ios::beg[/icode] [CODE]fbin.seekg(0, std::ios::beg);[/CODE] if this doesn't …

Member Avatar for Pelle_3
0
196
Member Avatar for Afupi

[QUOTE=Afupi;1169435]Ok so after a few days, I finally got the 8 queens problem solved. After having so much trouble I decided to practice recursion by doing the same problem but with 32 knights. 8x8 board, place 32 knights without them attacking one another.[/QUOTE] A bit off topic so apologies :) …

Member Avatar for Afupi
0
459
Member Avatar for stricklypni

you have not got [icode]{}[/icode] matched in all places. The compiler won't give you a line number for this so if your code isn't too long and you still can't find the error post it. [QUOTE=stricklypni;1173753]I will show the code if you want to see the error.... Am still working …

Member Avatar for stricklypni
0
105
Member Avatar for Pynolathgeen

[QUOTE=Pynolathgeen;1171525]My program keeps crashing when not in debugging mode. So now i'm debugging manually, or well, log everything to find where it is crashing [code=C++] DirectX = new DIRECTX(); // Creating DirectX [/code] [/quote] is not calling : [QUOTE=Pynolathgeen;1171525] [code=C++] DIRECTX::DIRECTX(HWND Window) [/code] [/quote] but [CODE]DIRECTX::DIRECTX()[/CODE] so we can't see …

Member Avatar for tetron
0
129
Member Avatar for cpp.coder

> start quote: # include <stdio.h> abc (y++); // error here > end quote. This result surprised me too. I guess it is because y++ passes the variable into the function as y and then tries to further alter the variable after entering the function which adds potential undefined behaviour …

Member Avatar for cpp.coder
0
187
Member Avatar for VilePlecenta

Here is a sample header file: should have: 1- description to ensure that you understand your design 2 - meaningful class name the same as the .h file name you can have iterator classes in the same header 3 - function names that make sense 4- comments on how to …

Member Avatar for VilePlecenta
0
147
Member Avatar for micmagicfly

Main needs to cin [CODE] std::cout << "please enter operator" << std::endl; std::cin >> character; [/CODE] before [QUOTE=micmagicfly;1171541][code] switch (character) { case '+' : addition(); [/code][/QUOTE]

Member Avatar for tetron
0
122
Member Avatar for anugrah.agrawal

You are not describing all of the details very thoroughly: [QUOTE=anugrah.agrawal;1168939]....i am well versed with the algorithm to do this... PLease help!!!![/QUOTE] I am assuming that you are using visual studio To read the input from a GUI - either write an application that is part of the GUI or …

Member Avatar for anugrah.agrawal
0
152
Member Avatar for dchunt

Without seeing your code it is a tricky question to answer. What you probably want to do is put both programs into classes then you can create an instance of the class and decide whether to run it on the if say a simplified version of your code looked like …

Member Avatar for tetron
0
154
Member Avatar for buckkitty

[QUOTE=buckkitty;1169179]Hello, [code] double temp_data = NULL; //temporary matrix int u = 654; // u = the total number of periods in the time series [/code] bk[/QUOTE] There are some inconsistancies in your descriptions and implementation. If this isn't an assignment there are quicker ways to load the data. 1st this …

Member Avatar for tetron
1
96
Member Avatar for merse

const is a some what overrated concept that leads to more typing and maintenance. In your case myfunc is not const as it alters a member variable if this is not appropriate to be altered then you need to use a local [CODE] double myfunc(double x1,double x2, double x3) const …

Member Avatar for mattjbond
0
166
Member Avatar for strmstn

I have no tried playing around with this One approach is known as skinning or a skin This can change the style of how windows appear used to be popular for windows themes. Another approach is more re-writing the wheel where you use a window with no frame and redraw …

Member Avatar for tetron
0
143
Member Avatar for o0mkh0o

!st template class will compile fine until the code is used. [icode]TreePath[/icode] is not defined in the code you have shown Path has some risky behaviour [QUOTE=o0mkh0o;1168737] [CODE] T& getLastPathComponent(void) const { return *lastPathComponent; } [/CODE][/quote] using a pointer that you do not own without any error checking is dangerous …

Member Avatar for o0mkh0o
0
321
Member Avatar for PDB1982

I will try to be succinct: 1. a static member variable acts like a single common variable that is a global so there is only really one 'n' in the whole project 2. a constructor [icode]()[/icode]is called every time the computer has to allocate memory and give an address to …

Member Avatar for pecet
0
133
Member Avatar for stefy14

One approach is to treat all of your input as chars say using [icode]std::srting[/icode] [CODE] #include <string> #include <iostream> int main() [ std::string input; std::cout << "please enter data" << std::endl; std::cin >> input; //using an int instead of sizetype f //step over each char of input int sz = …

Member Avatar for tetron
0
131
Member Avatar for TaSkOnE

I am rusty on this but as you say if hWind = 0 then you are using a method that requires a handle to a window if this is 0 it most likely means that you have not created a window successfully. So your new might not have created a …

Member Avatar for TaSkOnE
0
2K
Member Avatar for dude1

if you load the file [icode]#include <fstream>[/icode] read in the file using [icode]std::ifstream("folder\\file.txt"[/icode] now two options load into a single string or line by line. Single [icode]std::string[/icode] will be easiest there are google articles on how to do this The next thing is [code] std::string data; //load data //this is …

Member Avatar for dude1
0
153
Member Avatar for C Newbie

you are asking sensible questions about how you would reverse the digits of a number. And the reason why you are having problems is that it is not defined behaviour - so to code it for non-integers requires a decision as to what is intended. Option one treat it as …

Member Avatar for phoenix911
0
2K