49,761 Topics

Member Avatar for
Member Avatar for klint.austero

What and how does shared namespace in C++ works? Are most of the variables, types, and procedures can be used in shared name space?

Member Avatar for Ancient Dragon
0
122
Member Avatar for nullifyQQ

User is supposed to type an input, and if it's not an integer, the user needs to type another. This repeats 3 times for 3 inputs which go inside an array. The integer checking works, but the problem is that when i display the 3 integers, they are all the …

Member Avatar for deceptikon
0
303
Member Avatar for Vasthor

not working: // range for for (int (*row)[4] : ia) { for (int col : *row) cout << col << " "; cout << endl; } // error: cannot convert 'int*' to 'int (*)[4]' in initialization. working: // range for for (int (&row)[4] : ia) { for (int col : …

Member Avatar for Tumlee
0
939
Member Avatar for ThatBitchYeah

i don't have a clue what is wrong here.... the program is supposed to add, subtract, multiply and divide two real numbers. #include<stdio.h> float add(float x, float y); float subtract(float x, float y); float multiply(float x, float y); float divide(float x, float y); int main (void) { int choice; float …

Member Avatar for CGSMCMLXXV
0
156
Member Avatar for Dewey1040

So I'm using the >> operator to read objects from a file one by one. I am simultaneously counting the objects and need to read them again one by one to print from a certain point. inFile.clear(); inFile.seekg( 0, ios::beg); Doesn't seem to work for me, and I assume it …

Member Avatar for CGSMCMLXXV
0
152
Member Avatar for trinibaby

Hi, I'm having some trouble with my code that convert binary to decimal using recursion. this is my code #include <cstdlib> #include <iostream> using namespace std; void binaryToDecimal( int binaryNumber, int decimal, int weight ); int main(int argc, char *argv[]) { // binary to decimal int decimalNum; int bitWeight; int …

Member Avatar for great_learner
0
3K
Member Avatar for nullifyQQ

I have this weird problem. If my constructor is [header] class Book { private: vector<string>Entry; public: Book(); [cpp] Book::Book(){ Entry.push_back("0"); Entry.push_back("1"); Entry.push_back("2"); The weird thing is that it does not update when I do more .push_back. I use: void Book::addItem(vector<string>newItem) { for(int f=0; f<Entry.size(); f++) { Entry.push_back(newItem[f]); cout<<Entry[f]; } } …

Member Avatar for L7Sqr
0
291
Member Avatar for GDICommander

Hi, everyone! When I'm building my project on Visual Studio 2008 that uses Xerces, I have the following linker errors: [CODE=text] 2>XmlPersistingService.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl xercesc_2_8::XMLPlatformUtils::Initialize(char const * const,char const * const,class xercesc_2_8::PanicHandler * const,class xercesc_2_8::MemoryManager * const,bool)" (__imp_?Initialize@XMLPlatformUtils@xercesc_2_8@@SAXQEBD0QEAVPanicHandler@2@QEAVMemoryManager@2@_N@Z) referenced in function …

Member Avatar for Dazza2
0
1K
Member Avatar for sciwizeh

Hello all, I have not tested the code I'm posting here to see if it compiles, but I have an issue in a large codebase and I believe that this should be the simplest program to demonstrate the issue; class base { public: shared_ptr<base> clone()=0; }; typedef shared_ptr<base> baseptr; class …

Member Avatar for sciwizeh
0
20K
Member Avatar for MasterHacker110

I know you are suppose to use GetPrivateProfileString(); But I dont know what the arguments for the commad is.

Member Avatar for Doogledude123
0
84
Member Avatar for nullifyQQ

Please bear with me. This is my first post. For some reason, I can only display the strings if I put the cout in the same loop. But since I have to separate addString() and displayAllStrings(), I can't do that. My displayAllStrings() keeps failing. BUT when I write a separate …

Member Avatar for Lucaci Andrew
0
1K
Member Avatar for tensity

I am trying to populate a vector of strings and then remove any duplicates within that vector. Here is what I have so far. I am getting an error saying: Error 2 error C2064: term does not evaluate to a function taking 2 arguments . void removeDup() { vector <string> …

Member Avatar for vijayan121
0
320
Member Avatar for Doogledude123

Hey guys, I need a function that reads a text file and stores the character someway, (I am assuming a 2D Array would be best?) then a function that reads through the characters and if the char is something specific (like "X") then it would draw a square (QUAD) 10wx10h …

Member Avatar for Doogledude123
0
382
Member Avatar for FtKShadow

I am trying to get my homework assignment to work for class, but I cant seem to get it. Heres the assignment. [QUOTE]Write a program that asks the user to guess the next roll of a six sided die. Each guess costs $ 1. If they guess correctly, they get …

Member Avatar for StefanRafa0
0
3K
Member Avatar for aps1003

Looking for an assist to modify this program based on the following info: Using two temporary linked list iterators and three for-loops modify a linked list with a perfectShuffle (); function (only modify the TODO line of code).. Here is the driver code: #include <iostream> #include <stdio.h> #include "linkedList.h" using …

Member Avatar for aps1003
-1
179
Member Avatar for haber5

I am working with sql server using ADO provider. My code uses recordsets and commands to run quries and I fail to understand a basic issue - connections. In my code, they set a connection string (which is being built in the code, not taken from other ADO element) to …

Member Avatar for Ancient Dragon
0
206
Member Avatar for DarWar

Hi everyone! So I have this code to modify. I need to write a code inside the **int main** field, that would cause 37 launches of the constructor called M_48(). I have no idea how to solve this. Any ideas?

Member Avatar for deceptikon
0
195
Member Avatar for wolwayne

After playing for 5 or more times the total scores are going out or range (In the table generated at the end). I tried using long but didnt helped. #include<conio.h> #include<iostream> #include<stdlib.h> #include<string> #include<windows.h> #include<time.h> using namespace std; unsigned flag=0, ply_m,ply_t,ply_s,zz,i; //funct for gotoxy void gotoxy(int x, int y) { …

Member Avatar for wolwayne
0
119
Member Avatar for onlyremedy

I accidentally closed my Toolbox in VC++ IDE.. now I donno how to bring it back. Please help...

Member Avatar for RaajiManju
0
177
Member Avatar for brock.holman.7

i would like help making a little piece of code that just counts down from a number, example 30 to 0. the program shouldnt display the previous numbers counted. thats it, any hel-p would be great.

Member Avatar for Gonbe
0
135
Member Avatar for xxwikkixx

Hey everyone I was working on a small tool and also refreshing my programming skills. my problem is I want to pick a random number from 60,000 to 200,000. it does that but the number it displays are not dramaticly changed. For example if it out puts 062045, i hit …

Member Avatar for vijayan121
0
190
Member Avatar for sblass92

I'm setting up a finite state machine structure as a proof of concept to be used in other projects. The states have function pointers that point to actions they are allowed to perform during certain events and transitions. I'm trying to restrict these pointers to be a part of a …

Member Avatar for sblass92
0
2K
Member Avatar for edivadin

i want to create a warehouse program for school using the random access file management. i built a class called product(prodotto) with many private var and i must create a new record. The function checks if the product already exists with the seekg pointer and reading the file. After u …

Member Avatar for Ancient Dragon
0
131
Member Avatar for john.halbert.37

My problem I am having is when I use execl, it close my main program. I want the program I create can open other programs or create other actions with linux. I am looking to help getting on the right path. Should I be using execl? Why does it close …

Member Avatar for john.halbert.37
0
212
Member Avatar for ktsangop

Hello i'd like to ask a quick one. -Mfc VC++ 6 application. -NO Unicode support by design. -Greek characters appear fine in all dialogs since OS is Windows Greek version (?) -Greek text is both hard coded in c++ source files and retrieved from mysql database. -ONE specific Edit Box …

0
104
Member Avatar for magyarosi.botond

Hi guys. I was wondering how Cnet Downloader, and ninite.com works. Is there a backend server which compiles the exe file before every download? Is there any other way to modify something in an .exe file without recompiling? Thanks.

0
117
Member Avatar for ztdep

typedef double (*sizefn_t) (double *); sizefn_t sizefn = userSizeFace; Dear friends: Could you pleaset tell me what is the meaning of the code, what does sizefn_t represent. what is the meaning typedef.

Member Avatar for deceptikon
0
117
Member Avatar for thammalatha

Hi All, Can any one tell me the what are the differences between WinSock and WinInet in mfc? Thanks in advance.......

Member Avatar for nmaillet
0
94
Member Avatar for animesh
Member Avatar for ztdep

Dear friends: I download a c packge for my computation work. there is a function " aft2boundar(int *, double *)" in it. i write a "main.cpp" with vs2010, when i compile, it gives me the following error unresolved external symbol "int __cdecl aft2dboundary(int *, double*) but i have include the …

Member Avatar for ztdep
0
153

The End.