Posts
 
Reputation
Joined
Last Seen
Ranked #707
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
83% Quality Score
Upvotes Received
19
Posts with Upvotes
18
Upvoting Members
13
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
3
4 Commented Posts
0 Endorsements
Ranked #490
~48.1K People Reached
About Me

Since it was made clear to me that my help is not welcome if not delivered in the only admissible language, I see no possibility for me to stay.

Consider this account closed...

Favorite Forums
Favorite Tags
Member Avatar for nightcrew

[QUOTE]Assume you have a int variable n that has already been declared and initialized. Its value is the number of integers that need to be read in from standard input and printed out in sorted (ascending) order, each on a line by itself. Furthermore, there are no duplicates in the …

Member Avatar for omgerg
0
3K
Member Avatar for kimbokasteniv

What I am trying to do is the following: [CODE] ReceiptBag zero("zero"); ReceiptBag one("one"); ReceiptBag bags[2]; bags = &zero; (bags+1) = &one;[/CODE] Of course that is not valid code. My goal is to be able to reference the same zero or one object by using its variable name or by …

Member Avatar for kimbokasteniv
0
283
Member Avatar for irre

hello, im totally new to this forum, but i already checked whether my ask is answered somewhere else already. i couldnt find anything... i used to work with dev-cpp and i have to work with the cnum.h library a lot. Since im a student i am able to get MS …

Member Avatar for Ancient Dragon
0
177
Member Avatar for pushpat

Hi folks, I am learning operator overloading concept in c++, wrote sample program to test overloading of unary operator '!' and '-'. Code will work if i use them as friend function but not for member function. Can anybody tell where am i going wrong in function bool operator!(const co_ordi …

Member Avatar for pushpat
0
325
Member Avatar for NickPatton

I'm working on an assignment where I have to write my own raisePower function to take a base and a power and compute the product. The assignment states that the function needs to return a long but all input/output values should be ints. The code compiles and runs but does …

Member Avatar for Caligulaminus
0
185
Member Avatar for mikeshadow

I need an algorithm that finds how many prime numbers are in a set interval; the interval maximum range is 1 000 000 so a brute force method of checking every number is kinda inefficient

Member Avatar for mikeshadow
0
499
Member Avatar for Idestruction

Hey all! I am writing an application that will read data coming in through a serial port (RS232) and write that data to a file. This file will then be parsed by a php script and the data will uploaded to a server. Is there a function that allows me …

Member Avatar for L7Sqr
0
279
Member Avatar for siabenie

Hi all, Can anyone explain to me in details preferable with an example the different between i++ and i++ please. Here my example with what I understood: [CODE] for (int (0); i<10; i++) { cout << i++; cout << ++i; } [/CODE] What is the output? Is the working steps …

Member Avatar for siabenie
0
168
Member Avatar for Karlwakim

Hi everybody, I wrote a game in which you have to guess a number generated randomly,but when i try to assign a random number to the variable, it just doesn't work but it compiles fine. The code : [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () …

Member Avatar for Karlwakim
0
150
Member Avatar for devindamenuka

hi all, I am new to c++. I want to return array. I found that I have to use pointers but doesnt have idea. here is my code [code] // test2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; const int …

Member Avatar for cool_zephyr
0
382
Member Avatar for Despairy

I cant seem to find anything useful on the web except adding outside libraries for this one help is required. I wrote a program that you can say builds a database of users and their passwords. the program loads the users from an existing file already into a hashtable. now …

Member Avatar for Caligulaminus
0
928
Member Avatar for paranoidSandra

hi everyone!i'm working on a project and i'm getting two errors of the type mentioned in the title. here's the part of the code that generates the problem: [CODE] #include "Instance.h" //default constructor Instance::Instance(unsigned features) { num_of_features = features; fileName = "-"; category = true; keywords = new string[num_of_features]; featureID …

Member Avatar for paranoidSandra
0
172
Member Avatar for LateNightCoder

In my program I read in a text file an decrypt the text from an array. once decrypted i then have to do through it again and search for every tenth array member and show their memory location. The code so far: [CODE] int main( ) { int* pCrypted = …

Member Avatar for LateNightCoder
0
292
Member Avatar for usustarr

Hi, I need to search for a key word in last n/100 lines of a text file. Here is the code i have so far. This search whole file & that is an issue. This is not a home work question, please help. [ICODE] ifstream readFile(fileName);//read the file while( readFile …

Member Avatar for usustarr
0
190
Member Avatar for karthik.datt

#include <iostream> #include <windows.h> #include "g.h" typedef unsigned long (*AsmFunc)(AS_INBUF *, AS_OUTBUF *, T_REG_INF *, T_MPCNT *, ICE_ID *); int main() { AsmFunc _AsmFunc; HINSTANCE hInstLibrary = LoadLibrary((LPCWSTR)L"C:\Documents and Settings\karthikdatt\Desktop"); if (hInstLibrary) { _AsmFunc = (AsmFunc)GetProcAddress(hInstLibrary, "Assembler"); if (_AsmFunc) { std::cout << "ASSEMBLER FUNCTION" << _AsmFunc(ptr1,ptr2,ptr3,ptr4,ptr5) << std::endl; } } …

Member Avatar for karthik.datt
0
191
Member Avatar for sujan.dasmahapa

Dear Friends I have a mfc application which I already converted to a dll. now I want to launch that application from another win32 client application. So how I can achieve this. Any h elp would be highly appreciated. check my code snippet. [CODE]//in App.h header extern "C" __declspec(dllexport) void …

Member Avatar for sujan.dasmahapa
0
343
Member Avatar for maybnxtseasn

[CODE]struct ch8_struct { int field1; short field2; char field3; int field4; double field5; }; struct ch8_struct g_StructArray[3]; ch8_struct *g_pStructArray = g_StructArray; ch8_struct **g_ppStructArray = &g_pStructArray; g_ppStructArray[1]->field1 = 11;[/CODE] program is crashing on g_ppStructArray[1]->field1 = 11; i think my pointer notation is wrong :)

Member Avatar for Caligulaminus
0
74
Member Avatar for anu07

The output I expected was: [ICODE]alpha beta[/ICODE] I used the following code: [CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); char choice[2][5]={"alpha","beta"}; cout<<choice[0]<<endl; cout<<choice[1]; getch(); }[/CODE] But this is what comes: [ICODE]alphabeta beta[/ICODE] Can anyone tell me what I did wrong? Thank you. P.S.:I know I am not using standard c++, but …

Member Avatar for anu07
0
173
Member Avatar for ChaosKnight11

Hi, I started with C++ development recently, and I think I'm ready to start building GUIs for my apps. I'm thinking about using Qt, since it is the most popular C++ GUI library, but the licensing is really confusing, and there isn't a lawyer nearby that understands software licensing who …

Member Avatar for Stefano Mtangoo
0
320
Member Avatar for Will Gresham

Hello, I am having an issue with C++. I am relatively new to this language. The issue I am having is that I am unable to use a variable declared as private in my class. Definition: [code] class Matrix { public: Matrix(void); Matrix(int rows, int cols); Matrix(const Matrix& m); ~Matrix(void); …

Member Avatar for JasonHippy
0
158
Member Avatar for amulgarg

[CODE]#include<iostream> using namespace std; void prin();//statement a main() { int x; //statement 1 x=34;//statement 2 return 0; }[/CODE] I wanted to know if the variable x is allocated memory in statement 1 or in statement 2. Its a long time doubt and no one really gives a clear and confident …

Member Avatar for limaulime
0
97
Member Avatar for anujthefuhrer
Member Avatar for meli123

BOOL is basically pretty intuitive.. my question: [CODE]#include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { double cost, finalPrice; bool type; type=true; //taxable cout << "Enter price: "; cin >> cost; if (type) finalPrice = cost*1.07 ; else finalPrice = cost; cout << "Final price: " …

Member Avatar for mrnutty
0
93
Member Avatar for wazzer225

Hello just curious, I know that i'm supposed to use new in c++ but decided to experiemnt with malloc. Can you explain to me why the following code crashes and what is the reason. I was under the impression that the size of vector is fixed as it just stores …

Member Avatar for Stefano Mtangoo
0
3K
Member Avatar for owenransen

As far as normal ascii is concerned can I compare a wchar_t with a char type to see if they are equal? I think, but do not know, that the most common ASCII chars have the same integer value in char and wchar_t. Is that true? Do I need to …

Member Avatar for owenransen
0
2K
Member Avatar for murnesty

I having problem of sizeof returning a hexadecimal value which I want it return decimal here is my sample code: [CODE]#include <cstdlib> #include <iostream> #include "stringCascade.h" using namespace std; void StringCascade (void) { unsigned char ucA[] = {0x02, 0x6F, 0x09, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x00, …

Member Avatar for tajendra
0
132
Member Avatar for Gaving30

Hi All, First time asking so go easy :-) I am doing c++ a few weeks now, i am doing questions in Project Euler to hopefully improve my coding, But as you will prob see below i am still very new and "Nieve"... Question is: The prime factors of 13195 …

Member Avatar for TrustyTony
0
439
Member Avatar for FriXionX

As in, if you had an if statement, for example: [CODE]if(endProgramChooseType != 'y' || 'Y' || 'N' || 'n'){ (code for exiting program) }[/CODE] How would you do that in a switch statement? without doing [code]case 'a': case 'A': case 'b': case 'B': case 'c': [/code] etc.

Member Avatar for FriXionX
0
6K
Member Avatar for sergent

Why doesn't this work: [CODE]#include <iostream> class myclass { public: union d { int i; }; }; int main() { myclass i; i.d.i = 3; return 0; } [/CODE] but this does: [CODE]#include <iostream> class myclass { public: union { int a; }; }; int main() { myclass i; i.a …

Member Avatar for mike_2000_17
0
168
Member Avatar for hqt

I'm sorry because I think this is a popular fault but I haven't found why it happened yet. this is a code that has that fault: [CODE] void readfile(){ FILE *f; int u,v; f=fopen(fi,"r"); fscanf(f,"%d%d%d%d",&n,&m,&s,&t); for (int i=1;i++;i<=n) for (int j=1;j++;j<=n) c[i][j]=(i!=j)? Oo:0; for(int i=1;i++;i<=m) fscanf(f,"%d%d%d",&u,&v,&c[u,v]); fclose(f); } [/CODE] when …

Member Avatar for hqt
0
572