49,757 Topics

Member Avatar for
Member Avatar for Girija_1

I have an issue with my code ... my below code is createing databases(database here is a kd tree) and indexing one image per database. i have two classes LastDatabaseTndexingPolicy and another forwardingDatabaseaccessor.cpp . I am calling the GetDatabaseToAccess() function from forwardingDatabaseAccessor.cpp class .GetDatabaseToAccess() function is present in LastDatabaseTndexingPolicy class …

Member Avatar for mike_2000_17
0
131
Member Avatar for coiseng

I'm just curious why my application actually crashes after it compute the area of a cross. I output is correct but it crashes after it calculation is done. cross.cpp void Cross::setCrossCord() { for (int i=0; i<=12; i++) { cout << "Please enter x-ordinate of pt " << i+1 << ": …

Member Avatar for kal_crazy
0
451
Member Avatar for umairs007

Write A Function called '**Seperator**' in C++ language which print 15 *s in a single line. Write Another Function named **"Multiple"** that takes an integer as an argument and prints its multiple up to ten terms, seperated by spaces,in a single line . Write A C++ Program which takes an …

Member Avatar for rubberman
-2
149
Member Avatar for Learner010

after getting bored with turbo c++ ide , now i have installed codelight ide for c++ and i don't know how to use it. well , i have done following created a workspace named "hello_world" created a project named "hello" while creating a project i was asked to give a …

Member Avatar for rubberman
0
129
Member Avatar for GillBates

hello all I'm trying to write a program that returns us [U]majority element[/U]. [I]An array is said to have a majority element if more than half of its entries are the same - [I]>(size of the array)/2[/I].[/I] It wouldn't be a problem if i had no conditions, but i have …

Member Avatar for kal_crazy
1
3K
Member Avatar for Richard_10

I am using the 3 files of code from the C++ book Chapter 11 and 11.8 Case Study:A Date Class with both cpp files and header file my questoion is how do i (add overloaded operator for "--" (pre and post), "-=", and ">>". For ">>", user expected to type …

Member Avatar for mike_2000_17
0
283
Member Avatar for shifa.abbasi
Member Avatar for Ancient Dragon
0
144
Member Avatar for TheDude11

So I need help creating a RPG program for my class. Below I posted what is needed...Any help is greatly appericated!! ***Unit 13 Graded Programming Assignment - RPG Game*** You are to create an RPG for your programming assignment. This program: needs to use at least one vector needs to …

Member Avatar for proctree
0
177
Member Avatar for cambalinho

by some reason the TextOut() function don't show me the text:( but see these code: #include <iostream> #include <string.h> #include <windows.h> using namespace std; int main() { HDC a=GetDC(GetForegroundWindow()); cout << GetLastError();//i get 0(no errors) Rectangle(a,3,4,3+80,4+20);//the rectangule is showed TextOut(a,10,10,"hello world",strlen("hello world")); cout << GetLastError();//i get 0(no errors) cin.get(); } …

Member Avatar for cambalinho
0
343
Member Avatar for passant.elwasimy

2. Write a function that takes an an MxN matrix such that if an element in this input matrix is 0, its entire row and column is set to 0. void changeMatrix(int *Mat[],int M, int N)

Member Avatar for ddanbe
0
67
Member Avatar for Swirly

I am trying to create Dijkstra's algorithm for a weighted graph, and have a flaw, I believe, in the implementation of the basic algorithm. It only visits the nearest nodes, checks the edges, but nothing else. Right now, I'm afraid I'm too close to this to see what's going on. …

Member Avatar for kal_crazy
0
279
Member Avatar for TheNewKid

Hey everyone, I am working on a win32 project right now and I have a few buttons that I wanted to change how they look so I gave them the BS_OWNERDRAW property and drew them myself. Now sense I am using ownerdraw there is no visual indication of when someoone …

Member Avatar for tinstaafl
0
288
Member Avatar for manel1989

hi all! i have to send a whole vector as a parameter from a code java (eclipse) to a c++ code(VS2010)i have some quations about that: 1. how can i send the whole vector in once? i already know how to send it element by element so i want to …

0
95
Member Avatar for cambalinho

i have 1 class Multithread, but seems that i have some errors:( #include <process.h> #include <string> using namespace std; class MultiThread { private: void * b; public: void ParameterList(void *c) { b=c; } void Thread(unsigned (__stdcall*) (void *) ) { _beginthreadex(NULL, 0, (__stdcall*) (void *) , b, 0, NULL); } …

Member Avatar for cambalinho
0
458
Member Avatar for DawnofanewEra

Why are some algorithm to solve TSP using dynamic programming can solve up to 10 cities while some can go beyond that...i.e. 10, 100 or more..!! What is the factor that determines the capability of the algortihm to solve more than 10 or less..??

Member Avatar for tinstaafl
0
1K
Member Avatar for priyanka.choudhary.90038

Hi, I do have doubt regarding const declaration in copy constructor. Can anyone let me know why do we need const reference in copy constructor, as we already know reference itself is const pointer.So why we should use const as a prefix in copy constructor. Regards, Mohan

Member Avatar for deceptikon
0
1K
Member Avatar for Vasthor

http://s8.postimg.org/zbfc0h92t/New_Bitmap_Image.png 'contents' can't be initialized whatever I did, thus I can't declare the type in this class class Window_mgr { public: // location ID for each screen on the window typedef std::vector<Screen>::size_type ScreenIndex; // reset the Screen at the given position to all blanks void clear(ScreenIndex); private: std::vector<Screen> screens{ Screen …

Member Avatar for tinstaafl
0
294
Member Avatar for cambalinho

can anyone explain to me what is: 'T', 'L', 'wchar_t', 'LPCWSTR' and 'LPCTSTR'? how can i convert strings\char* to these types? (i understand these isn't a tutorial, but i realy need these introdution) or you can give me just a nice link.

Member Avatar for cambalinho
0
142
Member Avatar for Lee_2

This may be a simple error but however. I was running my simple programs as normal and then when i went back to the program later to copy some code there was an error message highlighted underneath the first brace of my main() function. The error states - error: first …

Member Avatar for tinstaafl
0
2K
Member Avatar for saurav2007

#include<iostream> using namespace std; int &fun() { static int x = 10; return x; } int main() { fun() = 30; cout << fun(); return 0; } Output is 30 why not 10? please explain me the concept of Lvalue.. Thank you in advanvce.

Member Avatar for Ancient Dragon
0
277
Member Avatar for kelvin.njuguna

ou have been tasked to write a program that takes two complex number and return theie sum.However the + operator will not worl with complex numbers and you figure you need to verload the + and the assignment opeartor=.Ypu have come across the program (http://wwww.cprogramming.com/tutorial/operator_overloading.html) implement it and the client …

Member Avatar for Schol-R-LEA
0
295
Member Avatar for tbuchli

Create a check digit that is the remainder of the account number when it is divided by 5. This digit should be added to the end of the 4 digit account number. Account #12344 #include <cstdlib> // Standard C library... #include <iostream> // Contains cout, cin objects... using namespace std; …

Member Avatar for tbuchli
0
464
Member Avatar for jennifer.gregoryboswell

I need help with: *the code for y/n and entering a 0 or 10. * and how do I switch from lowest to highest to highest to lowest? Problem: Set up a grading program. The program should allow the user to enter grades from the keyboard until a 0 is …

Member Avatar for Ancient Dragon
0
173
Member Avatar for Suzie999

I found myself needing a threadsafe global variable to indicate when a thread is complete. Quickly discovered `std::atomic<type> var(val);` only to find it has no support in my IDE. Can anyone offer an alternative? I have an operation that needs to be carried out which takes some time, I cannot …

Member Avatar for rubberman
0
720
Member Avatar for tensity

I am trying to create a text based graphing program and I am running in to some trouble. My trouble isn't so much with the programming its with one particular algorithm in creating the points. So, here is sample of what the graph will look like with points included. (y …

Member Avatar for tensity
0
363
Member Avatar for cambalinho

imagine these line: cout << "glória vitória"; //glory vitory why instead print 'ó', prints '3/4'(the ascii char)??? changing the console font name, can resolve it?

Member Avatar for cambalinho
0
102
Member Avatar for mixelplik

Hi, I'm trying to send an array of data to a .txt file, and after a couple days am just rewriting code I wrote days ago. I have an array of ints that I want to send to file in three columns outputFile.open("sorted.txt"); for(int i = 0; i < size; …

Member Avatar for L7Sqr
0
422
Member Avatar for glenwill101

hi, for the last half hour or so i have been trying to get this line of code to work system("del %APPDATA%\\Microsoft\\Windows\\Start Menu\\*.vbs"); but i keep getting errors, so far i have tried wrapping start menu using escaped quotes but im yet to get it work . any help would …

Member Avatar for tinstaafl
0
152
Member Avatar for lightdshadows

Hey guys, I have a homework problem that I'm having issues with. I've been having a difficult time understanding classes and what the point of them is when I feel like I can just write everything in main without using a class, but I'm forced to use them anyways. This …

Member Avatar for mike_2000_17
0
1K
Member Avatar for aastha b

Assume that a bank maintains two kinds of accounts for customers, one called as savings account and the other as current account. The savings account provides compound interest and withdrawal facilities but no cheque book facility. The current account provides cheque book facility but no interest. Current account holders should …

Member Avatar for arunava.iiitcal
-3
2K

The End.