49,761 Topics
| |
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: … | |
(I have another thread on the main page here but that was directed towards getting some basic file structure issues worked out) Problem: I need to create a dictionary that has words that are look-up-able, from a text file. I need to have two classes (Word, Meaning), one for the … | |
Hello! I have a sample application. I just put a breakpoint at the beginning of main(). The callstack pointed to a function called mainCRTStartup() and before that, the kernel32.dll was present(grayed out). Can anyone please tell me what these functions are, and who invokes them? Thanks in advance! | |
Hi everyone, Here is my problem: For my research I need to work with files of 700 Mb. I get "Segmentation Fault" error and while my code works for smaller files, I assumed the large size of the file leads to this problem. That is why I think that I … | |
If I remember correctly from C# to C++ the following should convert into the second following. I need to create a console application that will output the physical address of the main interface on a user's computer. This in my experience seems to always be the second interface in the … | |
Hey guys, I am very new to c++, and im trying to learn and master the basics Could you guys please tell me what i am doing wrong here. I want to maintain my current coding format. This is a simple converting code. Will be accepting inches, and feet, that … | |
here is the code that I have. I'm supposed to be able to input 3 employees, display their individual totals and also combined totals. I know there's some error with the functions or adding, because my result is: Employee Name ......................... mary Base Pay .............................. 200 Hours in Overtime ..................... … | |
I run the program and nothing prints out.. #include <iostream> #include <vector> #include <windows.h> using namespace std; void check_neighbors(vector<vector<char> >, int [22][88]); void generation(vector<vector<char> >); void display(vector<vector<char> >); int main() { vector<vector<char> > world(22, vector<char>(88, '.')); int neighborArray[22][80]; //Intial condiion world[3][3] = '*'; world[3][4] = '*'; world[4][4] = '*'; world[3][7] … | |
Hi All, I am trying to follow the CS106B: Programming Abstractions to learn C++ ([url]http://www.stanford.edu/class/cs106b/[/url]) . As part of the practice, I have to configure Visual Studio to include the custom libraries. I followed the instructions availble at the following location: [URL="http://www.stanford.edu/class/cs106b/handouts/02-Getting-Started.pdf"]http://www.stanford.edu/class/cs106b/handouts/02-Getting-Started.pdf[/URL] [URL="http://www.stanford.edu/class/cs106b/handouts/07P-Downloading-Visual-Studio.pdf"]http://www.stanford.edu/class/cs106b/handouts/07P-Downloading-Visual-Studio.pdf[/URL] [URL="http://www.stanford.edu/class/cs106b/handouts/08P-Using-Visual-Studio-2008.pdf"]http://www.stanford.edu/class/cs106b/handouts/08P-Using-Visual-Studio-2008.pdf[/URL] Can anybody guide me how I … | |
hi to all! i have a question since my program keeps showing a message which is very annoying.i have asked in several forums but still i havent found a satisfying answer but i just found out about this one,so i hope my problem will get solved! i have several sets … | |
I keep getting a run time error, i think i has to do with the generate and/or checkNeighbor methods [CODE] #include <iostream> #include <vector> #include <windows.h> using namespace std; void display(vector<vector<char> > grid) { for(int x = 0; x < grid.size(); x++) { for(int y = 0;y < grid[x].size();y++) { … | |
I am supposed to make a binary hash tree mix of code. I know what I am doing for the most part, but its been a while since I have done some serious C++ coding. The compiler is yelling at me because it doesn't like my last definition in my … | |
1.) I am about to run to class and work for the day so I wanted to get this up before I left. 2.) I am using code blocks on Windows. 3.) I ma having an issue where either my main.cpp cannot find my header file, or if I change … | |
Hello, I have been working on a program that I got to work successfully, but when I transferred it to having only function calls in my main(), I started to get run errors telling me that something is being used without being initialized after I enter the second number. Basically … | |
I have a problem with this code : [CODE] #include<iostream> using namespace std; void qsort(int A[], int len) { if(len>=2){ int l=0; int u=len-1; int pivot=A[rand()%len]; while(l<u) { while(A[l]<pivot)l++; while(A[u]>pivot)u--; swap(A[l], A[u]); } qsort(A,l); qsort(&A[l+1],len-l-1); } else{return;} } void swap(int a, int b) { int temp; temp=a; a=b; b=temp; } … | |
Hi all, I am bit confused about this question: What is the value of i after the for statement is done? [CODE] int n = 100; int m; n = m; for (int i = 0; i < ; i++) { .. } [/CODE] I tried to write it down … | |
Hi, I need help about launching a web site in default browser using Borland ( button click = launch google.com, for example ). I found solution valid in DEV: [CODE]ShellExecute(NULL, "open", "http://google.net", NULL, NULL, SW_SHOWNORMAL);[/CODE] But it shows an error if used in Borland: [ICODE]Access violation at address 0A1826C8 in … | |
I am programming for a genetic algorithm. there is a class named Chromosome. populationsize=1000; Chromosome chromosomelist[populationsize]; when I am using this array of objects chromosomelist to initialize some other object Chromosome parent1 = chromosomelist[p1]; I am getting access violation error for p1 greater than 20 upto 999, while it is … | |
Hello all . Where could one find the dock panels and autohide thumbtack that is used in ms visual for the project manager and other stuff. I am using c++ forms in ms visual. So far i cant find any code for this, or any programs that contain this addition … | |
when i had XP i used to be able to make my own card games using the cards.dll file for solitaire and freecell etc, but my probelm is now i have moved to windows 7 64 bit theses programs no longer work as there does not seem to be a … | |
Hi! I am trying to make a simple program that would determine the number of occurrence or frequency of 20 given array elements according to their respective range. My output should be like this: [CODE]Range Frequency 0-4 0 5-9 1 10-14 3 15-19 5 20-24 7 25-29 3[/CODE] However, I … | |
hello everyone! i'm writing a program where i want to choose a random double but not greater than "i" which is a specific value --lets say 60--i'm doing the following: [CODE]double b = rand()%i+1[/CODE] and i get the error while compiling : [I][U]invalid operands of types 'int' and 'double' to … | |
I have a node class that has a Node* parentNode atribute. My constructor is as follows: [CODE]Node::Node(Node* p,const State& s, int d) : parentNode(p), currentState(s), depth(d){ }[/CODE] BUT with this constructor I get a problem: I'm using this class to run a AI Search and at depth 3 it generates … | |
I'm trying to write an echo like thing doing this : [CODE]> echo Muffins Muffinst > echo two muffins two muffins[/CODE] The problem Is that the program isn't being started from command line, The > is my programs input prompt (trying to write a very simple command line) How would … | |
Hello I'm quite new to Jquery, so bare with me please. I've searched google, but I couldn't find an answer to my question. I'm developing an asp.net 4.0 application, and i wrote a Jquery inside my content page: [CODE] $(document).ready(function () { $("#Button1").click(function () { alert("Hello"); }); }); [/CODE] I … | |
[CODE]for ( i=0;i<a;i++ ) { qin.Echo(); qin>>b; if(b == (char)8) { total--; cuv[i-2]=cuv[i-1]; cuv[i-1]=0; i--; } else if(b!=char(13)){ // for key enter total++; space++; cuv[i]=b; } else break; } [/CODE] If pressed once or twice "backspace" works, but if pressed for more than two times, not working, first i checked … |
The End.