General C++ Programming - March 2014 (Page 18)

Problem with the function pdlacpy/MKL.
 
Hello! I have a matrix A =| 0 1 2 | |3 4 5 | | 6 7 8| and I want to copy the first two columns to another matrix B like this B =| * 0 1| ...
[1 reply] : Read the source, it describes the parameters: http://www.netlib.org/sc... (by Smac89)
Remove duplicates vector of strings, keep first instance. Can't use algorithm
 
I have a vector of strings.vector input; bob sam bob sammom aardvark money aardvark wanted I need to remove the duplicates but each part of the ve...
[4 replies] Last: There are many other ways to remove duplicates and most of them are no... (by Smac89)
Constructors
 
Hi I am not familiar with using constructors. Could someone please explain the reason constructors are used and an example.
[2 replies] Last: Thanks a lot (by Stephanie16)
Having Problems with classes
 
Hello. I am creating a battleship program and it appears for everything to be working fine, except the shots. For some reason my shots and my locations are not ...
[4 replies] Last: Update: I figured out the deploy but the fire function is messed up. (by Tressor54321)
for imaging experts
 
Hi! I want to write a program to resize images, and I'm wondering if any of you guys know where I could find reliable information about image file formats (jpeg...
[no replies]
Is this the same? (vectors notation)
 
Is the same to write: (1) mesh electrodeMesh(10e-9,4,10); than to write: (2) mesh electrodemesh = {10e-9,4,10): I understand that BOTH (1) and...
[4 replies] Last: Thank you @L B..! (by ryllprous)
Why does this code work that way?
 
I want to find a code that would search for a natural number n>1 such that satisfies n | 2^{n-1} + 3 or i.e. 2^{n-1}+3 is divisible by n. So I've written t...
[11 replies] Last: yes, the required integer overloads may be packaged as function templa... (by Cubbi)
Constant in C++!
 
Hello thank for coming to me! //VALID: const int CONSTANT=100; int integerArray ={ 0 }; //but after getting input let's say: cin>>randomInteger; int inte...
[3 replies] Last: Line 8 is perfectly valid, however it is a runtime constant instead of... (by LB)
Program, array problem
 
Hi, I am a beginer in C++. I'm doing a program which made me frustrating. The object is to create a program which should calculate the best way to buy items (...
[no replies]
I have no idea how to begin to program this...
 
Create a program that simulates a random walk. It starts with position 0. If a generated random number is an odd number, it moves to the right (add 1), if the...
[3 replies] Last: It's a start. Edit your post and write [co de] before your code and ... (by LB)
Types of arrays
 
Can somebody explain me the difference between: 1. int normalarray = {1,2,3,4,5}; 2. std::vector<int> vec(5); 3. int* dynamic = new int ; ?
[6 replies] Last: Ok, thanks for your help..! :) (by ryllprous)
recursive merging linked list - HELP!!
 
hey i've just started learning building structures in c++ and they gave us an exercise of writing a recursive merge code of linked lists - just merging without...
[1 reply] : Please use code tags when posting code, to make it readable: http://w... (by MikeyBoy)
compilation error
 
can someone just compile this and tell me what exactly the error do this code have? #include "stdafx.h" #include<iostream> using namespace std; double ...
[17 replies] Last: hey daleth, i tried hard to find out why my values of y are showing li... (by praneshiitm)
creating a copy of BST
 
void copy(node *& dest, node * root) { if(!root) { dest = NULL; return; } else { dest = new node; dest ->...
[2 replies] Last: The seg fault might not be coming from this code. I don't see anywhere... (by Smac89)
by NDSE
reading from a .txt file
 
Hello. I am having an issue loading information off of a .txt file. The file reads the following: Minor Health Potion 0 0 0 0 0 0 0 0 0 1 10 0 1 5 Although...
[6 replies] Last: Correct, that is where I have it. I moved the txt file to the working ... (by NDSE)
Code Reference
 
I just found the website: https://code-reference.com/start It is supposed to be a reference for programmers, but it is just starting out and very small. If anyo...
[3 replies] Last: If you're not sure where to start typing your code and getting result... (by Catfish666)
std::string in std::map clear error
 
hey im using this an i cant find what im doing wrong my program crashes when EraseLastError function is called struct STATSSTRUCT { std::string LastError; ...
[10 replies] Last: when is the best time to use pointers in this kind of thing im doing?... (by MikeyBoy)
Compiler/Linker differences in Visual Studio conversion
 
Hi, First post. I apologise if I break any rules/post in wrong section. I have a project that is essentially a hot pot of C/asm (naked functions etc). The co...
[1 reply] : What errors/exceptions does it give away? Or it simply doesn't work? D... (by tath)
University information
 
Hello everyone ! I want some help related to university courses.. Does anyone know what profile/course should i follow at faculty time if i want to study algor...
[4 replies] Last: thank you anyway for the help provided (by fluture)
by lolwe
Help for some functions
 
Create Class CSalary with private member variables string m_strProfession double m_dSalary Constructors:Default,Copy,Explicit Functions: 1/string GetPro...
[1 reply] : Your equality comparison operator is only checking the m_strProfessio... (by MikeyBoy)
March 2014 Pages: 1... 1617181920... 36
  Archived months: [feb2014] [apr2014]

This is an archived page. To post a new message, go to the current page.