49,757 Topics

Member Avatar for
Member Avatar for C++ programmer

Hey guys, Recently I started learning win32 api using C but I am pretty scared of the Long and confusing Variables used in it. It appears alot difficult for me to learn those as I am learning myself. Will such kinds of variables will appear in future or not. Thanks. …

Member Avatar for thines01
0
249
Member Avatar for DaniFollower

hello i have problem with visual studio 2010, every time i want to open new project this massage appear: Project .vcproj' failed to open what is the problem? thanks

Member Avatar for thines01
0
43
Member Avatar for ahoysailor

Hi, I want to search a managed list, List<String^>^ list, for a variable substring (i.e. the substring changes it's contents every time it is looped). The list is populated by a Unicode (UTF-16LE) text file. The substring to be searched for is basically an ID for the Strings that occurs …

Member Avatar for thines01
0
237
Member Avatar for iamthesgt

In building an application, I can make the project on one computer, but I can't on my other one. The thing that is holding me up is: [ICODE]#include <cppconn/resultset.h>[/ICODE]. I've searched but I can't find the package I need to install to get this library on my computer. I'm running …

Member Avatar for iamthesgt
0
129
Member Avatar for fmasroor

I am trying to make a program that couts characters in alternating colors. [CODE]#include <iostream.h> #include <windows.h> #include <dos.h> #include "Random.h" void main() { randomize(); HANDLE hcon = GetStdHandle(STD_OUTPUT_HANDLE); int basecolor1=random(256), basecolor2=random(256); char board[4][4]; int x, y, k; for(x=0; x<4; x++) { for(y=0; y<4; y++) { k=(x%2); k+=(y%2); k=k%2; if(k==1) …

Member Avatar for deceptikon
0
151
Member Avatar for C++ programmer

Why should a person learn win32 api? What things I can do when i have learnt it? Some people tell "There is no need to learn win32 api because literaly you will only design Window(box, messagebox etc), which you can easily do by MS Visual studio tools!". Is this true? …

Member Avatar for Ancient Dragon
0
136
Member Avatar for subrata_ushasi

Hi, I am trying to develop a autocad like software in C/C++. Can any one suggest me how to start it with ? Subrata

Member Avatar for myk45
0
293
Member Avatar for gategold
Member Avatar for DJSAN10
0
89
Member Avatar for Commonman4012

Hello World! I am having trouble with a linear search algorithm function that I have to write for a program. The direction for this function states: A linear search algorithm, where x is the searched item in vector v. It simply starts searching for x from the beginning of the …

Member Avatar for ravenous
0
197
Member Avatar for taj2011

This is the code and there is something wrong with the check column function. I am unsure and need help. #include <iostream> using namespace std; int sudoku_solution[9][9]; const int array_size = 9; inline int random() { return rand() % array_size + 1; } bool check_column(int value, int row, int column) …

Member Avatar for DJSAN10
0
139
Member Avatar for karmstrong

I am having and issue getting my add to list function to work in my data structure list class. I have all functions working except addToPostion. addToHead, addToTail, deleteFromhead, deleteFromTail, and DeleteFromPosistion all work as expected. I'm confused on the addToPosistion. The entire .cpp file is posted. Any and all …

Member Avatar for karmstrong
0
308
Member Avatar for miturian

Am, with baby steps, becoming acquainted with the boost library. So far I'm compiling examples. From the tutorial, there is a very short regex-example, mostly there to test that the library is linked correctly: [CODE]#include <boost/regex.hpp> #include <iostream> #include <string> int main() { std::string line; boost::regex pat( "^Subject: (Re: |Aw: …

Member Avatar for miturian
0
474
Member Avatar for jackmaverick1

I've got a little inventory management system going, and it searches for products by name. It also loads old data from a file on the hard disk. For whatever reason, when it loads the name, it doesn't accept the name that it displays in the save/buy functions. If that doesn't …

Member Avatar for jackmaverick1
0
147
Member Avatar for br0wnm4n

So I am stuck on my assignment where I am suppose to make mortgage calculator and I am suppose to do the following things: 1. Mortgage Calculator : prompts the user for (a) principal, (b) Annual interest rate , (c) number of months.It calculates the monthly payment and prints the …

Member Avatar for Zvjezdan23
0
381
Member Avatar for amir808

can a stack act as a queu or does it has to be last in first out? i am trying to make a program, using Huffman`s compression theory, and i am using stack, while its explained using a queu...i want to know if this can be done... thanks in advance …

Member Avatar for amir808
0
110
Member Avatar for Karlwakim

Hi everybody, Is it possible to run c++ console apps in webpages ? I know that its not possible, but is there a way to do that ? Thanks.

Member Avatar for Karlwakim
0
117
Member Avatar for subith86

I am trying to implement my own version of BigInteger which can hold an arbitrary big integer. I have posted my BigInteger.h file here and I need your suggestions if there is any better design for this. 1. std::string private member will hold the BigInteger in the form of string. …

Member Avatar for VernonDozier
0
2K
Member Avatar for srinath1

void swap(int *x,int *y) { static int *temp; temp=x; x=y; y=temp; } void printab() { static int i,a=-3,b=-6; i=0; while(i<=4) { if((i++)%2==1) continue; a=a+i; b=b+i; } swap(&a,&b); printf("a=%d b=%d out side rec\n",a,b); } main() { printab(); printf("end of output 1"); printab(); } out put for the first printab() is 6 …

Member Avatar for srinath1
0
115
Member Avatar for anjelo00

#include <iostream> #include <conio.h> using namespace std; int counter=1; int m=1; int n,j,o; int main() { for (n=9;n>=1;n--) { for (j=5;j>=counter;j--) { cout<<"*"; } if(counter>5) { for (o=0;o<=m;o++) { cout<<"*"; } m++; } counter++; cout<<endl; } getch(); } my problem is, i need to enter number to get that output, …

Member Avatar for anjelo00
0
181
Member Avatar for DavidB

Hi, everybody. I am reviewing some old code and two questions came to mind. 1) Is it better to use “[B]\n[/B]” or [B]endl[/B]? [INDENT]"[B]\n[/B]" seems to be working just fine, but most code samples I see in books nowadays use [B]endl[/B]. What is the difference?[/INDENT] 2) For multi-line output statements, …

Member Avatar for PrimePackster
0
138
Member Avatar for daldrome

Hello. I am trying to use the strtok function to separate individual words and store them in a 2D char array. However, only the first word is stored in the 2D array. [CODE]cout << "Enter a string: "; cin.getline (str, MAX); //count number to words char *p = strtok (str, …

Member Avatar for deceptikon
0
2K
Member Avatar for ztdep

[CODE]#ifndef PARTICLE_H #define PARTICLE_H #include<vector> #include<iostream> using namespace std; class Particle { protected: public: Particle(); Particle(const int aDim); int dimension; vector<double> velocity; vector<double> position; vector<double> pBest; double pBestFitness; double fitness; bool valid; bool operator<(const Particle& aP2) const; ~Particle(void); }; #endif[/CODE] [CODE]#define SWARM_H #include"Particle.h" #include<vector> #include <Algorithm> #include<iostream> #include<stdexcept> using namespace …

Member Avatar for jaskij
0
95
Member Avatar for anuj.juthani

i am calculating some expressions and the result of these expressions is a DOUBLE type value , i am storing this result into a double type variable called Sum . now i want to write this value of Sum into the Edit Control of a Dialog Based MFC application . …

Member Avatar for thines01
0
982
Member Avatar for jaai

Hi to all, can anyone clarify me if i can create buttons(like in dialog) in mdi application in vc++ 6.0...? thanks....

0
64
Member Avatar for noprogn

The compiler keeps complaining it cannot understand one operator<< manipulator if it is in one order, but accepts it if it is in a different order or statement. But the error code is cryptic, it finds the correct function signature among candidates but gets lost in a string of parenthesized …

Member Avatar for noprogn
0
320
Member Avatar for borchu

Hello, I am asking about true syntax of the following:: I have a class name P and in header file (of this class) ------> [CODE] class P { public: P(); ~P(); void addItem(const int newItem); void deleteItem(const int Item); void showAll(); /** need to proper getter funct. of tail */ …

Member Avatar for borchu
0
245
Member Avatar for txwooley

I've been going through a couple of tutorials on SDL and having moderate success. But this one has me stumped. The tutorial from LazyFoo.com has me creating a dot that emits sparks. I followed along and wrote my code which returns my .bmp as NULL. Hmmm, I must have done …

Member Avatar for jaskij
0
911
Member Avatar for xtinab

I keep getting these errors: Validation.obj : error LNK2005: "bool __cdecl dotDashRules(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?dotDashRules@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in main.obj Validation.obj : error LNK2005: "bool __cdecl IsValid(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?IsValid@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in main.obj I can't get rid of them. This program is …

Member Avatar for thines01
0
600
Member Avatar for Despairy

Hi, we were asked to build a 2d complex maze using c++ and sfml. the game includes: a king that needs to reach his castle a warrior that kills orcs and they drop money a thief that collects the money to open gates and more characters. so far no problem. …

Member Avatar for Despairy
0
303
Member Avatar for Peter4n31

Hello, I need to update my older Autodesk plug-in. And I am having troubles get it through. (They changed one function) This is a new definition which I cannot change: [CODE] CoreExport virtual void EnumAuxFiles(AssetEnumCallback& assetEnum, DWORD flags);[/CODE] And here is my code: [CODE] class CheckFileNames: public AssetEnumCallback { public: …

Member Avatar for Peter4n31
0
369

The End.