49,760 Topics

Member Avatar for
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
304
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
Member Avatar for rmbrown09

(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 …

Member Avatar for jaskij
0
524
Member Avatar for myk45

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!

Member Avatar for deceptikon
0
137
Member Avatar for SakuraPink

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 …

Member Avatar for SakuraPink
0
155
Member Avatar for lxXTaCoXxl

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 …

Member Avatar for DeanMSands3
0
525
Member Avatar for seanster138

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 …

Member Avatar for jaskij
-1
349
Member Avatar for mrsjdoyle73

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 ..................... …

Member Avatar for jaskij
0
109
Member Avatar for gdubz

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] …

Member Avatar for Lerner
0
134
Member Avatar for morpheus063

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 …

Member Avatar for onenoc
0
386
Member Avatar for noscimo

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 …

Member Avatar for noscimo
0
94
Member Avatar for gdubz

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++) { …

Member Avatar for VernonDozier
0
1K
Member Avatar for MasterGberry

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 …

Member Avatar for MasterGberry
1
183
Member Avatar for rmbrown09

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 …

Member Avatar for jaskij
0
378
Member Avatar for SoftShock

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 …

Member Avatar for SoftShock
0
236
Member Avatar for aditdano

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; } …

Member Avatar for jaskij
0
216
Member Avatar for siabenie

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 …

Member Avatar for amir808
0
134
Member Avatar for MrEARTHSHAcKER

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 …

Member Avatar for MrEARTHSHAcKER
0
151
Member Avatar for mechstough

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 …

Member Avatar for ravenous
0
168
Member Avatar for jonnyboy12

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 …

Member Avatar for jonnyboy12
0
222
Member Avatar for glenc70

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 …

Member Avatar for BobS0327
0
161
Member Avatar for lupacarjie

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 …

Member Avatar for Yugatha
1
541
Member Avatar for vyrte

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 …

Member Avatar for vyrte
0
235
Member Avatar for mitrious

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 …

Member Avatar for mitrious
0
212
Member Avatar for Zssffssz

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 …

Member Avatar for WaltP
0
257
Member Avatar for rotemorb

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 …

0
68
Member Avatar for KasmIR

[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 …

Member Avatar for KasmIR
0
79
Member Avatar for james6754

[CODE] class Matrix { public: int M; int N; double *ptr; Matrix(int m,int n)//constructor takes two ints { M = m; N = n; ptr = new double[M][N]; assign(M,N);//call function } void assign(int M,int N)// method { for(int i = 0; i < M;i++)// i is a row { for …

Member Avatar for james6754
0
139
Member Avatar for tobo

hello i have a problem to solve for a commandline-programm: there are several types of inputs to get and these can look like: keyword1 <double> value1 <double> value2 keyword2 <double> value1 keyword3 <double> value1 ... I just can't figure out how to do it! thanks!

Member Avatar for tobo
0
279

The End.