General C++ Programming - March 2017 (Page 7)

expression must have class type error... at targetIsbn.compare
 
#include<iostream> #include<string> #include<vector> #include <algorithm> #include "bookType.h" using namespace std; int main() { bookType b1 =...
[1 reply] : targetTitle is a string therefore you can use its member function co... (by coder777)
I am getting a syntax error on line where my if statement is because of the semicolon I place at the end..
 
#include<iostream> #include <string> using namespace std; int main() { //setting up numeral input double loan_Payment; double insurance; double gas; doub...
[3 replies] Last: @benhart, if the tool you advertise is so great why don't you show use... (by Thomas1965)
Delete LVITEM message WinApi
 
Hi it's possible to delete a LVITEM of winapi form¿??.. My winapi function will show a list of items and i search my item with the follow way.. static const ...
[1 reply] : You could try the ListView_DeleteItem macro https://msdn.microsoft.com... (by Thomas1965)
Visual studio and c++
 
When i try to enter in a number to the compiled code on the black screen, the black screen shuts off once i enter a number and press enter. It compiles so the c...
[3 replies] Last: You can avoid the use of "system" by hitting "Start Without Debugging"... (by JayhawkZombie)
When running program output will not stay aligned.Help please!!
 
#include <iostream> #include <string> using namespace std; int main() { double loan_Payment; double insurance; double gas; double oil; ...
[no replies]
Help: "Undefined reference to" error
 
In this program I'm trying to read in a input file and outputting the contents onto the output file and console. In the main, when I try to call the function o...
[2 replies] Last: I see. Thanks for the help! (by jrjamesruan)
by Ozzy69
Question about the file in C
 
Hello guys, i have a tiny question about the manipulation of files in C. For example, look this program: <code> #include <stdio.h> #include <conio.h> in...
[1 reply] : Assuming this is windows. If not, the -1 should be removed. if (res... (by jonnin)
by mkb555
Extracting bits from array of ints
 
I have an array of ints that I need to extract bits from. More specifically, I need to get the high half and the low half of bits of the entire int array. Fo...
[1 reply] : One way might be to convert them to strings via a bitset (as below). ... (by lastchance)
Convert LPWSTR to string
 
Hi i'm trying to convert LPWSTR but always i dont know but i complicate my life when i have a data like this. I know that LPWSTR is a long pointer to a constant...
[1 reply] : //Warning: This function loses data! std::string to_string(LPWSTR *w... (by helios)
Recursive digit addition
 
Write a recursive function that does the following: Given a number, add all the digits and display the sum. Example: The sum of the number 5432 would be...
[2 replies] Last: #include <iostream> using namespace std; int sumDigits( int n ) { ... (by lastchance)
by anonym
reading in a file and using for loops to calculate statistics
 
Hi, I'm very new to programming and i'm still trying to figure it out. Please any help with this would be very appreciated. For this project, we have to wri...
[1 reply] : Please use code tags so the site will add line numbers to your code. ... (by dhayden)
Creating an updating function for card game
 
Hi! I'm trying to create a function that allows me to update a set of cards: more specifically, I get two cards in the first hand, and if I decide to keep pla...
[1 reply] : You should simulate an actual deck of cards rather than just picking a... (by dhayden)
Need help :X edit : What is this new error even :X
 
#include <iostream> using namespace std; template <class T> class stack; template <class T> class item { friend class stack<T>; private: item(T x = 0...
[2 replies] Last: Ohh yeah the ";" was not supposed to be there i think but now there ar... (by jailabg)
in c++,is there something similar to the "arguments" object in javascript?
 
hello guys... maybe some of you had a previous experience with javascript. in javascript,there's something called the "arguments" object,this object is basicall...
[2 replies] Last: How can i perform the same task in c++? The solution is possible wit... (by mbozzi)
Vectors
 
Value will be stored in a vector but answer should stop at repeating number. ex 988 / 56 Answer 17.6428571429 But I want Answer to be 17.642857
[no replies]
redeclared without dllimport attribute: previous dllimport ignored
 
Hello i'm trying to compile this project.. #include "C:\Users\Androide\Desktop\minhook\Dynamic\MinHook_133_src\include\MinHook.h"//MHook header #include <iostr...
[1 reply] : SendMessageW is declared in winuser.h already, so there is no need to ... (by Thomas1965)
Regex
 
I have the following regex: std::string s("AAA"); std::smatch m; std::regex e("(?=.{3,}[A-Z])(?=.{0,}[a-z]).*"); output = std::regex_search(s, m, e); H...
[8 replies] Last: (?:[a-z]*[A-Z][a-z]*){3,} pattern: a string made up solely of al... (by JLBorges)
Start a paused process c++
 
i have this function: HANDLE Startpausedprocess(char *cmd, PHANDLE hthread)//Not const char* because CreateProcess may write on it { PROCESS_INFORMATION pi...
[5 replies] Last: sorry i was wrong im checking (by omarespanol)
Loop and Arrays
 
Can someOne explain to me what the code below does? void Device::msLogBitsAll( int dsindex, int numData) { double Level ; int nextbit; int start, stop...
[no replies]
Getting a "expression must have a constant value" on my switch statement
 
#include<iostream> #include <string> using namespace std; int main() { //setting up numeral input double loan_Payment; double insurance; double gas; ...
[1 reply] : The error is telling you that grand_Total >= 1000 isn't a constant e... (by mbozzi)
March 2017 Pages: 1... 56789... 19
  Archived months: [feb2017] [apr2017]

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