- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 19
- Posts with Upvotes
- 18
- Upvoting Members
- 13
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 3
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...
Re:
[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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 () … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 = … |
|
Re:
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 … |
|
Re:
#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; } } … |
|
Re:
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 … |
|
Re:
[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 :) |
|
|
Re:
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 … |
Re:
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 … |
|
Re:
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); … |
|
Re:
[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 … |
|
Re:
Give names of some languages that use negative array index? |
|
Re:
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: " … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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, … |
|
Re:
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 … |
|
Re:
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. |
|
Re:
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 … |
|
Re:
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 … |