49,757 Topics

Member Avatar for
Member Avatar for anukavi

Hi , Working on VC++ 2012. "error LNK2005: "class std::basic_ofstream<char,struct std::char_traits<char> > Createonly_logs" (?Createonly_logs@@3V?$basic_ofstream@DU?$char_traits@D@std@@@std@@A) already defined in UtilityFunctions.obj I have defined a text file (for writing the output) under LogFiles.h #include <fstream> using namespace std; ofstream Createonly_logs("E:\\MyProj\\MTEST\\CreateFile_logs.txt"); I have created three .cpp under the project and all these cpp uses …

Member Avatar for anukavi
0
116
Member Avatar for coolbeanbob

Hello, I am working on an assignment. I am given the code below. I am trying to figure out what the line directly below is doing. Is this a functor? I am getting a compiler error saying the compiler expects a ';' before the '*'. I've searched for functor examples, …

Member Avatar for rubberman
0
191
Member Avatar for $Tweety$

Heyy could any1 plz suggest sum really tough programs dat can be written in c++??

Member Avatar for vmanes
0
258
Member Avatar for twofel

hi, Menu on a Windows Form for Dev C++ hi, i have devc++ version 5.2.0.3 after compiling this prog i got following message: 110 46 C:\Users!__DEVCPP PROJEKTE\menu.cpp [Error] cast from 'HMENU {aka HMENU__*}' to 'UINT {aka unsigned int}' loses precision [-fpermissive] 100 56 C:\Users!__DEVCPP PROJEKTE\menu.cpp [Warning] deprecated conversion from string …

Member Avatar for pritaeas
-1
583
Member Avatar for SeanBlack0000

I am trying to create a graph from a 2d matrix of booleans. When the index [i][j] == 1, I need to create a link or edge from node[i] to node[j]. I am doing some thing wrong. I have created a class file with a struct node and some basic …

0
203
Member Avatar for eranga262154

Hi all, Using my application I've found a file path anywhere on my machine and store the full path in a CString variable. That is full path, like this, [CODE]G:\Work On\CPP\001_002_003.txt[/CODE] What I want to do is, find the name of the file(without the extension), 001_002_003 according to my example. …

Member Avatar for Gorf
0
2K
Member Avatar for dustin.mcalister.58

This is a bit of homework I have to do for my C++ class. I was suppose to add 11 as the pay code and 23 as the pay rate, but during the debug test when I type in 11 it doesn't display $23 like it's suppose to. What am …

Member Avatar for dustin.mcalister.58
0
127
Member Avatar for tumblinmonkeym

I have to write a program that creates a binary search tree from a file and output it and several other requirements. One requirement that I cannot figure out is how to find the search cost for each node. These are the instructions I was given Calculate the search cost …

Member Avatar for gusano79
0
651
Member Avatar for idlackage

Is there a way to have multiple search entries for one TreeView, each for a different column, or having one search entry handle all columns? The effect I'm looking for is (for example) having three columns, and thus typing into three search boxes to narrow down to the results that …

0
129
Member Avatar for ayesha.anwar.9047

Write a MIPS code for the following C program to run perfectly in Qtspim??? Void main () { Int array[10]; For (i=0; i<10; i++) { array[i]=compare(num, i);} } Int compare (int a, int b) { If (sub(a, b,) >=0 ) return 1; else return 0; } Int sub ( int …

Member Avatar for L7Sqr
0
48
Member Avatar for nishad_forums

Hi, I know C, C++, and Java (all basic knowledge, no GUI idea in C++ or C) and now I want to make a *desktop application with GUI in C++* but no idea about how to make it, google didn't help me a lot! Can someone please give me the …

Member Avatar for mike_2000_17
0
3K
Member Avatar for tiffany.leroux.7

I am doing huffman coding and I have made the tree. Now I am required to traverse the tree to create bit strings associated with the characters. Then I will put the bit string and char into a map to use with encode/decode. I have been working on this for …

Member Avatar for owenransen
0
454
Member Avatar for PixelExchange

Hello everyone. I would like to know if it is possible to double buffer a .png image using GDI+ Can anyone help me? Below is the code I used to display a png image with alpha transparency, however, I do not know how to double buffer it! Please help. DrawPng …

Member Avatar for owenransen
0
698
Member Avatar for bhawin

mu visual studio 2010 is showing a LINK : fatal error LNK1168:not opening exe file for writing

Member Avatar for owenransen
0
188
Member Avatar for Labdabeta

Ok, so occassionally as I write my code, a non-printing character is insterted... according to code::blocks this character is actually two characters (\302 and \206). I have done much searching to solve the problem, but a solution has eluded me. I tried using the windows console type command on a …

Member Avatar for Labdabeta
0
810
Member Avatar for filxy

when i debug this code it is giving few errors whats wrong in this code can anyone please help out :S #include "stdafx.h" #include <iostream> #include <conio.h> #include <string> #define T_SEMICOLON';' #define T_LPAREN'(' #define T_RPAREN')' #define T_ASSIGN'=' #define T_DIVIDE'/' #define T_WHILE 257 #define T_IF 258 #define T_RETURN 259 #define T_IDENTIFIER …

Member Avatar for sepp2k
0
288
Member Avatar for Zaina jee

I want to Implement a STACK class using linked structure to store the following information about students: i. Registration number of the student ii. Name of the student I want to Write client code, such that based on the registration number of the students, Then I want to Retain only …

Member Avatar for Labdabeta
0
217
Member Avatar for Xorlium

Hello, I'm having some problems with inheritance. The following code compiles and runs as expected: It prints out Hey: 1, since SomeFunction returns true. #include <iostream> class Base { public: virtual bool SomeFunction(const int& A) const = 0; }; class Derived : public Base { public: void hey() const; //bool …

Member Avatar for mike_2000_17
0
202
Member Avatar for GeneClaude

I can't seem to find the error in this code. I don't know if I constructed the codes correctly, assuming that the error is corrected, I could get the correct value? /* Function for Right Triangle */ #include<stdio.h> #include<conio.h> #include<math.h> #define p printf #define s scanf double rightTriangle(double x, double …

Member Avatar for Nutster
0
439
Member Avatar for tayyabatiq

I'm making a class for boolean expressions, a simpler version of bool. I need three operators, one for AND, one for OR and one for NOT. I can easily make **+** for OR, by overloading, but how can i declare **.** for AND and **'** for NOT? Can i even …

Member Avatar for Nutster
0
262
Member Avatar for akhil.mittra

Hi, I am trying to create a c++ program for counting the number of occurrences in an array using 2 1-D arrays such that the first array contains the elements and the second array gives the count of the number of occurrences of each element in the first array. Unfortunately, …

Member Avatar for emcela
0
695
Member Avatar for Melly3

Hi so I have to create a group of postings into a linked list with arrays not strings.I'm just not sure how to go about getting/converting this information into a linked list? class Posting { public: Posting(); //Constructor ~Posting(); //Destructor void user_input(char * input,char* &response); void create_posting(); void display_posting();//displays the …

Member Avatar for Lerner
0
182
Member Avatar for munchlaxxx

After I enter 'y' and the loop repeats, I get "Would you like to search by item or expiration date? Would you like to search again?" It seems like it's ignoring the getline and if/else statements...why?? And how can I fix this? Thanks in advance, everyone. #include <iostream> #include <cstddef> …

Member Avatar for NathanOliver
0
110
Member Avatar for triumphost

How can I install gcc 4.7.2 for codeblocks that supports both 32 and 64 compilation? If I install the x32 bit compiler: x32-4.7.2-release-win32-sjlj-rev10 it will compile with -m32 compiler switch but give a bunch of linker errors for -m64 If I install the x64 bit compiler: x64-4.7.2-release-win32-sjlj-rev10 it will compile …

Member Avatar for triumphost
0
378
Member Avatar for spawn2004

Hi everyone, I am having a difficulty with some code and I hope here somebody who is more expreinced from me can help me. I am having a program that reads a file store the data as objects in a vector. For example in the file i have : Once …

Member Avatar for spawn2004
0
128
Member Avatar for MRehanQadri

See the highlighted portion (in yellow) the definition of copyConstructor at http://libraryofcprograms.blogspot.com/2013/03/copyconstructor.html Why haven't we used obj.getX() ? void a::copyConstructor(a &obj){ x = obj.x; //should have used obj.getX() because we're accessing a private member of obj? }

Member Avatar for Nutster
0
153
Member Avatar for undeadelite

add the functions to overload the increment and decrement operators to increase the date by a day and decrease the date by a day, respectively; relational operators to compare two dates; and stream operators for easy input and output. (Assume that the date is input and output in the form …

Member Avatar for undeadelite
0
4K
Member Avatar for Kangol

Create the logic for a program that prompts a user for three numbers and stores them in an array. Pass the array to a method that reverses the order of the numbers. Display the reversed numbers in the main program

Member Avatar for asifalizaman
0
213
Member Avatar for firebird102085

Hello Everyone, Off the bat I want to say that I am just learning programming so if my code is missing basics I apologize. I was hoping that you might be able to give me an example of how you would solve this problem. I've spent the better part of …

Member Avatar for firebird102085
0
801
Member Avatar for normanallen

I am running Visual C++ 2010 Express on Windows 7 Ultimate SP1 32-bit. I have written a small program aimed at reading the contents of a given directory. However, while the program compiles correctly, it will not run as it says that opendir, readdir and closedir are unsatisfied externals. What …

Member Avatar for normanallen
0
254

The End.