51,593 Topics

Member Avatar for
Member Avatar for open2join

Hi I having trouble to export DLL which would contain one fucntion. The function would create an MFC dialog object, then the object is instantiated and then run method is invoked. The user input from the dialog would be the return value to the function and also it would the …

Member Avatar for rproffitt
0
321
Member Avatar for open2join

Hi I am considering to use C++/CLI because of .NET. My aim is to create DLLs where these would be used by some language. Would I be getting any problems if I decided to export DLL containing managed code? Any portability issues? Thanks in advance

Member Avatar for rproffitt
0
290
Member Avatar for cppgangster

Hi I am developing using C/C++ window application using winapi. I will be using some standard STL containers and some win api functions provided by windows.h. I would like use the app on different windows versions such as windows 7 and 10. The apps will be builded for x86 architecture. …

Member Avatar for zigale
0
574
Member Avatar for Yasin_4

The program needs to get loan amount, loan term, and loan interest rate from the user and then use those same numbers to create a function that calculates the monthly payment of the loan using monthlyPayment = principal * rate / ( 1.0 – pow(rate + 1, -term)); I've come …

0
241
Member Avatar for hollywoood69

Hey everyone of the c++ world. I am a little stuck. Here is what i am suppose to be doing. Write the program as an object-oriented C++ program that calculates and displays the mortgage payment amount from user input of the amount of the mortgage, the term of the mortgage, …

Member Avatar for Yasin_4
0
2K
Member Avatar for dekker13

I'm trying to add insert functionality to a textbook code example. I have an "off by one" error and I can't think of a way to fix it. Here's my attempt below: template< class NODETYPE > void List< NODETYPE >::insertMiddle( const NODETYPE &value, int position ) { ListNode< NODETYPE > …

Member Avatar for Amanuel_1
0
4K
Member Avatar for MattyEva

I should go to this program mentioned below. make a double loop (do ... while) to suppress an incorrect daily calculation!note :::: work with a char variable "error" for erroneous daily calculation. In contrast to the origin program, deposit and payout data should be requested again for a result of …

Member Avatar for Reverend Jim
-1
399
Member Avatar for Jibin_1

So, I have created a text file containing the following: 10001 General Electronics 500 20001 fACEBOOK 700 10002 Twitter 400 The records are stored in a struct containing an integer id, string company and integer number of shares variables. I want the user to enter a Id, say 20001, and …

0
283
Member Avatar for DavidB

I am updating a C++ program, part of which copies arrays of doubles by iterating through each array (copies elements of array wa2 into array X): for (j = 0; j < N; ++j) { X[j] = wa2[j]; } // End for j I would like to use the built-in …

Member Avatar for Tom_40
0
2K
Member Avatar for cambalinho

the question seems simple, but isn't. think that i have the functions list and it's parameters and the variables on vectors(inclued it's types.. it's a structure). now see these string(yes i have the words\operators count): function1 ( function2 ( ) , function3 ( parameter1 ) , parameter3 ) the count, …

Member Avatar for cambalinho
0
603
Member Avatar for Hamza_23

i want to write code in data structure using c++. my topic is online voting system.

Member Avatar for Adhocdegra
0
772
Member Avatar for Fernando_14

Hello! I am interested in the issue of protecting the code from hacking. Do you protect your code from decompiling and hacking? Why did the question arise? I worked in a team that developed games for Android. They all used obfuscators! So almost no one could hack their application. Now …

Member Avatar for StarDrago
1
3K
Member Avatar for coldkiller

I am working on a equation balancer for my 12th class computer science project.But somehow i am not able to balance the chemical equation.Please if anyone can provide me the source code it will be a great help.Urgently needed!

Member Avatar for Hariharan_1
1
7K
Member Avatar for cambalinho

i create the read(...) function for read to variables. but i need too the read()(without arguments) for press enter before continue\exit. void read() { //wait if the enter key is pressed: cin.ignore(); cin.get(); } template<typename first_t, typename... rest_t> void read(first_t &first, rest_t... rest) { std::cin >> first; read(rest...); //function is …

Member Avatar for cambalinho
0
2K
Member Avatar for cambalinho

i'm trying using the GNU compiler with command lines( using the ShellExecuteEx()). when i do: string FileName1="C:\\Program Files\\mingw-w64\\x86_64-7.2.0-win32-seh-rt_v5-rev1\\mingw64\\bin\\x86_64-w64-mingw32-g++.exe"; run(FileName1,"-c \"C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.cpp\""); the object file is created. these line creates the exe: run(FileName1,"-o C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.exe C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.o"); (tested) but the exe have some dependencies... so seen the Code Blocks: x86_64-w64-mingw32-g++.exe -Wall -g -std=c++14 -c …

Member Avatar for cambalinho
0
2K
Member Avatar for Aild

Hi all, I'm having a little problem with array and some "unqualified-id" problem. I've created gazillions (okay, maybe 80) arrays before but I had never encountered such problem. Especially with static arrays. [CODE] #include <stdio.h> #include <cstdlib> using namespace std; int main() { // with addition of buffers for 3x3 …

Member Avatar for Andy_20
0
13K
Member Avatar for Ashish Kumar_1

Create a text file (w/o using any C++ program) containing the names of students and their marks in the following format: **Ajay 350 Vijay 340** where name and marks are separated by either a space or a tab and end of line is a record separator. Write a program to …

Member Avatar for AS@daniweb.com
-2
702
Member Avatar for Sandra_18

hi so i am studying programming and i want to extract from an inputted string values in the left right and middle. i have only begun learning a few months ago so i dont know anything about pointer how to i build a funtion to extract the mid left and …

Member Avatar for rproffitt
0
356
Member Avatar for tobygarrick

and im working on Archery, bow hunting, bow sling, paracord, backcountry gear, tree stand, my sling-a-ling ,jakt gear, total archery challenge, hunting accessories, bowhunting accessories, bowhunting gear, bow hunting, 3D archery, archery tournaments, hunting season, archery sling, archery accessories much more .Im new in this forum I need lots of …

Member Avatar for happygeek
0
466
Member Avatar for Yoni_2

hello. how can i print out in textbox a void * value ? here is the code: uintptr_t offsetFromBuffer = (uintptr_t)internalAddress - (uintptr_t)&buffer; void * healthDecAddress = (void*)(currentChunk + offsetFromBuffer); richTextBox1->Text = healthDecAddress; // how can i do it right ?

Member Avatar for Yoni_2
0
415
Member Avatar for networkZombie

Ok so I have been trying to do project euler problem 1 which finding the sum of all the multiples of 3 and 5 that are less than a thousand. i dont know why my program is not working. here's my program - [code=c++] #include <cstdlib> #include <iostream> using namespace …

Member Avatar for memson
0
523
Member Avatar for Petcheco

Hello, friends. I did the fourth challenge on Project Euler and I'd like to know what I can do to improve the efficiency of my code. Right now it takes 1.562s to run and the source code is as follows: #include <iostream> #include <string.h> using namespace std; int Number = …

Member Avatar for memson
0
418
Member Avatar for nitos
Member Avatar for rproffitt
0
326
Member Avatar for Ana Mae

#include <iostream> #include <cstdlib> #include <fstream> #include <ctime> using namespace std; void array(int arr[], int arrSize); void add(int arr[], int arrSize, int newElem); bool edit(int arr[], int arrSize, int index, int newVal); bool delEm(int arr[], int arrSize, int elem); bool search(int arr[], int arrSize, int elem); bool PunoNa(int arr[], int …

Member Avatar for Ana Mae
0
896
Member Avatar for cambalinho

heres my actual code for find\search a folder: string FindDirectory(std::string FindDirectoryName[2], std::string StartDirectory="C:") { WIN32_FIND_DATA file={0}; string str=StartDirectory+ "\\*"; HANDLE search_handle = FindFirstFile(str.c_str(), &file); static bool blnFindDirectoryName=false; static string strFolderName =""; //testing if the folder is valid: if (search_handle != INVALID_HANDLE_VALUE) { do { //if the folder was founded, then …

Member Avatar for cambalinho
1
2K
Member Avatar for Ilia_2

Hi, I have a C++ program : // ConsoleApplication14.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <list> #include <queue> #include <vector> #include <string> using namespace std; class RectangularVectors { public: static std::vector<std::vector<int>> ReturnRectangularIntVector(int size1, int size2) { std::vector<std::vector<int>> newVector(size1); for (int vector1 …

Member Avatar for Nutster
0
606
Member Avatar for cppgangster

Hi I am trying to get windows positioned in specific order as show below ![desired.PNG](/attachments/large/3/6447240b1491d04046fa904f31659f9b.PNG) but I am unable to get and get always this ![wrong.PNG](/attachments/large/3/71f4b92c4f40a6afeeab7e3c2f136526.PNG) the code below is shown HDWP cmdWnds; cmdWnds = BeginDeferWindowPos(col.size()); for (int i = 0; i < col.size(); i++) { if (i == 0) …

0
341
Member Avatar for killerqb

I know an AVL Tree guarantees a time of log(n), but what is the time cost of the actual re balancing of the tree and why is this ignored?

Member Avatar for Herbert_3
0
499
Member Avatar for VASebastian

I am a beginner in C++ coding. Now I am making a little text based game and i need to do a loading screen. I've kind of made one but i want to fill it with this shape ■. What i know is that the ascii code for it is …

Member Avatar for rproffitt
0
655
Member Avatar for sgw

When I try to display the address of a char type variable, I don't get the normal hexidecimal address, but some strange symbols. I don't have the same problem with int or string, etc.. Example: char x='#'; cout << &x; The output of this is: #( ( What's the explanation?

Member Avatar for sgw
0
570
Member Avatar for restrictment
Member Avatar for emeraldamerican
0
6K
Member Avatar for browneyeguy25

I trying to write a code that reads a set of integers and then finds and prints the sum of the even and odd integers. The numbers will be read in from the user via the cin statement. You do not know how many numbers the user may enter. When …

Member Avatar for Reverend Jim
0
441
Member Avatar for JustinRunyon

Hello, have the following program code: #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main (void) { char c; while( (c = getchar()) != '\n') { putchar(c); } putchar ('\n'); return EXIT_SUCCESS; } At the moment he reads in entered characters and outputs them again. I should [write](https://prowritingservice.com/write-my-essay/) it so that …

Member Avatar for nullptr
0
251
Member Avatar for paulofficial

write a C++ program to find the volume of a cube. The program should provide setting and gettng the values of cube( height, length and breadth). show how encapsulation and abstraction is implimented in your programme. you must use a class concept and the main function.

Member Avatar for nullptr
0
152
Member Avatar for Sandy0221

I'm having a difficulty to write this program in c++ please help me First generate 100 random numbers in the range [11, 25] and store them in a file named “random.txt”. Write just one number in each row. Then open and read data from the file “random.txt”. Calculate the average …

Member Avatar for rproffitt
1
251
Member Avatar for peregrinepair

Hello, this is my first post. I need help with this assignment here, dont know where to begin! maybe I should use strstr()? The output needs to be what is shown at the bottom. I cant use the string class, only c-style functions. Any hints would be welcome thank you! …

Member Avatar for Reverend Jim
0
351
Member Avatar for ZombieKnight93

So I have a poker type program where it should shuffle and deal a deck of cards using arrays of pointers. I have to write a function that uses a pointer(s) to determine if the hand contains an Ace. If I can understand this one, I'd be able to do …

Member Avatar for tinstaafl
0
1K
Member Avatar for Zeeshan_10
Member Avatar for jeffersonalomia

Hi, I would like to ask a question about returning the column value(s) returned by stored procedure in c#. I have created the code but somehow I encountered an error saying: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll Additional information: Subquery returned more than 1 value. This …

Member Avatar for RabidDog5150
0
996
Member Avatar for elifelo

I want to create a game that computer guesses the number that i think between 0-500 but i am a beginner and i do not know what to do could you help me please ?

Member Avatar for rproffitt
0
376
Member Avatar for Pujinraffh

program buys internet packages with credit (pulsa) with do while loop . Dev c++

Member Avatar for rproffitt
-2
143
Member Avatar for Addison111

I have some problems when working with Win32 api. 1. Changing the text and background color of a button doesn't take effect. My code: case WM_CTLCOLORBTN: COLORREF colorref; colorref = RGB(0,0,255); HBRUSH hBrushBtn; hBrushBtn = CreateSolidBrush(colorref); return ((LRESULT)hBrushBtn); break; 2. How do I create selectable text. My code: text = …

Member Avatar for tinstaafl
0
315
Member Avatar for Ati_1

Algorithm 1) Choose the time quantum and assign it for each process. 2) Allocate the CPU to the process according to the FCFS scheduling. 3) If (burst time of the process < time quantum).{Allocate the CPU to that process till it terminates.}Else {The process will occupy the CPU till the …

Member Avatar for rproffitt
0
323
Member Avatar for fanolots

Hey, I don't know if this is the right place, but my issue is taking an output from a software SPI and using it in another function for temperature. The code below is marked with my issue, however it's not the full code. The full code is for a lab …

Member Avatar for tinstaafl
0
317
Member Avatar for Addison111

I'm trying to setup mongoos server in a Winndows app. The server code needs to be in an infinite loop, so does the windows main loop. I put the server code and win loop on 2 threads, the problem is, the program hangs when executed. Is there a way to …

Member Avatar for rproffitt
0
439
Member Avatar for djbsabkcb

Question: I have to do a program on alternating sums using vectors. I am not sure how to start this program. I thought about using an array and every even index add the value and every odd index subtract the value. Does that sound right? Any ideas?

Member Avatar for jacklin
0
2K
Member Avatar for Nancy_16

I am using PySide2 for GUI. I have a "Rename Project" QAction. The function must be like this: 1. set enable to false if tab name is "*Untitled" or file is unsaved. 2. set enable to True if file is loaded. How to do this? 3. Whenever switching to tab, …

Member Avatar for jacklin
1
1K
Member Avatar for ZombieKnight93

How can I make this to continue until the user presses N? I've tried using while(1), while( option == 'y' || option == 'Y') but it kept giving an error for that, and if/else statements but no luck. So I decided to try a do while statement and same results, …

Member Avatar for Smith5646
0
858
Member Avatar for tony_28

Hi All, In this program I have these 2 matrices . It will compare each element in each row of matrix[4][4] to 3 . If that value <= 3 then store the characters in the first row of matrix m_c[25][32] in an 2D char array (char clusters[40][40]). For example 3 …

Member Avatar for rproffitt
0
546
Member Avatar for Cyale

//How to change cin and cout to printf and scanf??? #include <iostream> using namespace std; char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; int checkwin(); void board(); int main() { int player = 1,i,choice; char mark; do { board(); player=(player%2)?1:2; cout << "Player " << player << ", enter a number: "; cin >> …

Member Avatar for rproffitt
0
499

The End.