49,757 Topics
| |
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. … | |
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 | |
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 … | |
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 … | |
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) … | |
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? … | |
Hi, I am trying to develop a autocad like software in C/C++. Can any one suggest me how to start it with ? Subrata | |
:S hello everybody. I don't know differentiation of C,C++, C#. Can you help me? | |
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 … | |
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) … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
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. | |
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. … | |
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 … | |
#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, … | |
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, … | |
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, … | |
[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 … | |
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 . … | |
Hi to all, can anyone clarify me if i can create buttons(like in dialog) in mdi application in vc++ 6.0...? thanks.... | |
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 … | |
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 */ … | |
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 … | |
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 … | |
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. … | |
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: … |
The End.