49,756 Topics

Member Avatar for
Member Avatar for NickyU

can more variables have the same value in an enum ? eg. [code] enum boolean { true = 1, false = 0, TRUE = 1, FALSE = 0 }; [/code]

Member Avatar for Bench
0
118
Member Avatar for BradenMurphy

Hi for my assignment i have to create my own greater than operator for a string class. Basically the class acts as the std string class library but i gotta edit the greater than operator in it. The assignment says upper and lower case should be treated as equal eg …

Member Avatar for BradenMurphy
0
185
Member Avatar for complete

I have heard a lot of talk about hashtables from time to time. They are supposed to be very cool ways of storing data where the index you use to look up the data is somehow the data itself. But hashtables are not part of the C++ standard template library... …

Member Avatar for ArkM
0
110
Member Avatar for jeremyhowell

I am completely new to C++. I want to know how to make a simple text program that takes user input and performs one of two operations depending on what the user entered. thanks for all help.

Member Avatar for Salem
0
106
Member Avatar for vedmack

Hi i got an application that uses the mso.dll and MSOUTL.OLB : [code] #pragma warning(disable: 4146) #import "C:\Program Files\Common Files\Microsoft Shared\Office10\\mso.dll" named_guids #pragma warning(default: 4146) #import "C:\Program Files\Microsoft Office\Office10\MSOUTL.OLB" no_namespace exclude("_IRecipientControl", "_DRecipientControl") [/code] In which I'm trying to create an instance of the "Outlook.Application" in the following way: [code] _ApplicationPtr …

Member Avatar for Salem
0
165
Member Avatar for Wiki_Tiki

Hi everyone, I'm busy working on a program that needs to store settings somehow, and have the settings saved. I don't know how to do this, so I've written a test program. The object of the test program is to enter a 4-digit password, (sort of like a locker lock) …

Member Avatar for Wiki_Tiki
0
96
Member Avatar for Bazman76

I want to change the results of function deal() below which fills out a string array. In the watch window I can change the result of the memory location that the pointer points to, but not the string that begins at that address. Is it possible to keep the memory …

Member Avatar for Ancient Dragon
0
126
Member Avatar for robertmacedonia

Hi, may I ask for a little help ? I don't know how to type a command for selected radio button. I mean - for example - if radio button is selected do this... I know there is a function KeyPress, but do not know how to use it, thanks …

Member Avatar for John A
0
113
Member Avatar for goodmuyis

Can Anybody Put Me Through Out To Add Image To My Database? I've Been Trying But Easy. Get Any Solution Pls Reply Me Or <Snipped>. Thanks.

Member Avatar for goodmuyis
0
67
Member Avatar for brizhou

A programmer has been asked to implement a simple game that requires the use of a board to position and manipulate some objects represented by symbols. The programmer has implemented the board as a two-dimensional array of characters. The following constants have been declared as global to the whole program: …

Member Avatar for ssharish2005
0
156
Member Avatar for QuantNeeds

Hello, Finally I am down to the last issue with my program: text file writing and reading. My file has a function whose ofstream object does work and produces a text file for printing called "print". This function is the printTextFile(fstream &readFromFile ) function. But initially it is supposed to …

Member Avatar for Ancient Dragon
0
306
Member Avatar for Prabakar

I have mentioned this before, I have to use turbo c++ in class. [B]Problem:[/B] I wrote the following code & to my surprise the code passed the compilation without any problem. I was even more surprised with the output. I just don't understand whats happening. This code won't compile in …

Member Avatar for Prabakar
0
148
Member Avatar for edel

Please, can you help me to solve these problems??? I've compiled codes on linux with make command and.... THANKSSSSSSSSSSSSS trinity@trinity-laptop:~/a-saodv$ make gcc -Wall -pthread -g -DDEBUG -c -o main.o main.c main.c:3:20: error: config.h: Nessun file o directory In file included from main.c:12: /usr/include/linux/wireless.h:660: error: expected specifier-qualifier-list before ‘__s32’ /usr/include/linux/wireless.h:673: error: …

Member Avatar for CoolGamer48
0
292
Member Avatar for QuantNeeds

I am having some issues. I was trying to use my setToolName function to copy the string into the array – this would check if the string was too long. But then it does not capture 2 words, say if the string is “lawn mower”. So I started to use …

Member Avatar for QuantNeeds
0
137
Member Avatar for jhonnyboy

hey guys just joined the forum and so far it looks very promising :D got a quick question for everyone that can help, i am trying to organize a txt file to output the "gpa" from highest to lowest. Now this is what i have so far... [code]#include <iostream> #include …

Member Avatar for jhonnyboy
0
124
Member Avatar for darkivader

Hello, im new to working with windows controls and im trying to create a simple listbox inside a main window. It compiles fine, but when i run it, the listbox is all screwed up and im fairly sure that my error message is trying to pop up (but for some …

Member Avatar for mitrmkar
0
164
Member Avatar for mayoub

Dear DaniWebbers, If you would all be so kind to help me, I have a problem here and I am trying to know why this happens... In a large application I am working on, I need to have a struct of some sort with a sub struct-array and the sub …

Member Avatar for mayoub
0
140
Member Avatar for integer*09

In my development com there's no issue of handling 4MB of text file data but it took about 1-2mins for my program to finish. I got a few questions here: Q1-> how much can this string "line" store? Q2-> should i use sstrm.clear() and line.clear() inside the while loop or …

Member Avatar for vmanes
0
121
Member Avatar for eladio_ees

Hello everyone!!, i have a question for you, do you know any libraries to develop wireless network in C/C++ but available for linux/unix?¿ Thanks!!

0
68
Member Avatar for 2fac323

My program reads the data from the infile. But outputs the wrong results accept for lowest temperature -21 which is correct. I have played with the while loop where I believe the problem lies but have been unsuccessful in getting the right results. Can somebody steer me in the right …

Member Avatar for ArkM
0
520
Member Avatar for clutchkiller

I am just currently getting into programming, and was curious. I know you wouldnt call C an outdated language, but for someone like me, would it be best to learn c++ instead of starting on C? If im correct, C++ is object oriented and C is Structured correct? So if …

Member Avatar for Ancient Dragon
0
108
Member Avatar for kneel

how can the searching code be created? i've made a program named address book. now i wanna make a function that can search an existing contact details from the file through 2 ways 1) search by name 2) search by phone No. kindly define me the code in C++ thx

Member Avatar for Ancient Dragon
0
165
Member Avatar for SonxQ7

Well i know the basic difference which is in C++ this is a pointer whilst Java is a reference to a class... I have a confusion though since am new in Java, can you reference a super class with "this"? more so, is the an underlying difference between the C++ …

Member Avatar for Alex Edwards
0
160
Member Avatar for sidatra79

Does anybody have any idea why the following code causes a memory error? Thanks everybody in advance :D [code=CPP]#include <stddef.h> // some older implementations lack <cstddef> #include <time.h> #include <math.h> #include <stdlib.h> #include <vector> #include <algorithm> #include <list> #include <deque> #include <set> #include <iostream> #include <iomanip> typedef double element_t; using …

Member Avatar for ivailosp
0
83
Member Avatar for Sarlacc

I am currently working on a project to create a program to test a persons pitch perception. For this i need to be able to process a microphone input to find out what the note that is being sungs pitch is. What would be the best way to go about …

0
88
Member Avatar for tonyaim83

Hi I m trying to create a map of STL which has set as one of it's element. Following is snippet of my code [code=c] .. std::map<std:string,std::set<int,int> > map_of_set; int a=9; int b=10; std::string str="test"; map_of_set.clear(); map_of_set.insert(test,9,10); //This gives compilation error [/code] kindly help

Member Avatar for sidatra79
0
141
Member Avatar for 2fac323

This program needs to read the infile and calculate the temperatures for each function. I can only get it to output 0's. Can someone explain the steps needed to make this code work correctly? What am I missing? Should I be passing by reference? If so how?? [ICODE]#include <iostream> #include …

Member Avatar for 2fac323
0
161
Member Avatar for Lukezzz

I have declared a vector with 3 Dimensions with the first code below. Then I have managed to push_back all the 3 dimensions so my vector is filled up like this: vector1[2][2][2] [code] typedef std::vector<string> String1D; typedef std::vector<String1D> String2D; typedef std::vector<String2D> String3D; String3D vector1; [/code] What I now need to …

Member Avatar for ArkM
0
2K
Member Avatar for kneiel

This one is on References. [url]http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/cplr110.htm[/url] in the above link (from IBM), they clearly mention that a reference to a (pointer to a reference ) is not allowed.They also say that a reference to other references is not allowed. However, when i tried out both these cases in code, it …

Member Avatar for kneiel
0
118
Member Avatar for dophine

Hi all, I just wrote a small problem to check gettimeofday in a multi-cores environment. [code] int timediff(double fTimeQvs, double fTimeTcp) { int iTimeDiff; iTimeDiff = (((((int)fTimeQvs)/10000) - (((int)fTimeTcp)/10000)) * 3600) * 1000000; iTimeDiff += ((((((int)fTimeQvs)/100)%100) - ((((int)fTimeTcp)/100)%100)) * 60) * 1000000; iTimeDiff += ((((int)fTimeQvs)%100) - (((int)fTimeTcp)%100)) * 1000000; iTimeDiff …

Member Avatar for Salem
0
200

The End.