Click here to Skip to main content
15,848,319 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: c++ program Pin
Eddy Vluggen8-Jun-20 6:13
professionalEddy Vluggen8-Jun-20 6:13 
GeneralRe: c++ program Pin
Member 148568768-Jun-20 6:23
Member 148568768-Jun-20 6:23 
Task-01:
Write a program in C++ that reads data from a file (ask user to enter file name). The number of elements in file are unknown so, you are supposed to regrow the array and dynamically allocate the memory every time it is needed.
Your task is to implement a function which separates 1-digit and 2-digit numbers from data and store them in two separate files.

Make sure to make independent function for different functionalities.

SAMPLE OUTPUT:

Example
Data.txt: 14 2 3 15 1 82 8 9 10 21 55 12 14 16 18
Data: 2 3 15 1 82 8 9 10 21 55 12 14 16 18
One-digit: 2 3 1 8 9
Two-digit: 15 82 10 21 55 12 14 16 18

Task-02:

Write a program in C++ that reads data from a file (ask user to enter file name). The number of elements in file are unknown so, you are supposed to regrow the array and dynamically allocate the memory every time it is needed.
Now, your task is to keep asking user two numbers, one is a num and second is location. Insert the num into that location and move the other elements to the right by re growing the array whenever needed. The function should keep asking user the number and location until user enters -99 in num.

Make sure to make independent function for different functionalities.

Example
Data: 2 3 15 1 82 8 9 10 21 55 12 14 16 18
Number = 74, Location = 3
Updated Data: 2 3 74 15 1 82 8 9 10 21 55 12 14 16 18
Number = -22, Location =5
Updated Data: 2 3 74 15 -22 1 82 8 9 10 21 55 12 14 16 18
Number = -99
Program Ended

..........................
can u help me in solving any one of these??

GeneralRe: c++ program Pin
Richard MacCutchan8-Jun-20 6:34
mveRichard MacCutchan8-Jun-20 6:34 
GeneralRe: c++ program Pin
Member 148568768-Jun-20 6:51
Member 148568768-Jun-20 6:51 
GeneralRe: c++ program Pin
Richard MacCutchan8-Jun-20 7:00
mveRichard MacCutchan8-Jun-20 7:00 
GeneralRe: c++ program Pin
Member 148568768-Jun-20 7:26
Member 148568768-Jun-20 7:26 
GeneralRe: c++ program Pin
Richard MacCutchan8-Jun-20 7:38
mveRichard MacCutchan8-Jun-20 7:38 
GeneralRe: c++ program Pin
Eddy Vluggen8-Jun-20 9:31
professionalEddy Vluggen8-Jun-20 9:31 
GeneralRe: c++ program Pin
Member 148568768-Jun-20 9:46
Member 148568768-Jun-20 9:46 
GeneralRe: c++ program Pin
Eddy Vluggen8-Jun-20 9:50
professionalEddy Vluggen8-Jun-20 9:50 
GeneralRe: c++ program Pin
Member 148568768-Jun-20 10:01
Member 148568768-Jun-20 10:01 
GeneralRe: c++ program Pin
Member 148568768-Jun-20 10:09
Member 148568768-Jun-20 10:09 
GeneralRe: c++ program Pin
Richard MacCutchan10-Jun-20 6:19
mveRichard MacCutchan10-Jun-20 6:19 
GeneralRe: c++ program Pin
Eddy Vluggen10-Jun-20 5:11
professionalEddy Vluggen10-Jun-20 5:11 
AnswerRe: c++ program Pin
Patrice T31-Jul-20 13:57
mvePatrice T31-Jul-20 13:57 
QuestionStrings in C | The program gives wrong output on string composed of both Upper case and lower case (Logic : ASCII Comparision) Why? Pin
Member 148492461-Jun-20 3:37
Member 148492461-Jun-20 3:37 
AnswerRe: Strings in C | The program gives wrong output on string composed of both Upper case and lower case (Logic : ASCII Comparision) Why? Pin
Richard MacCutchan1-Jun-20 4:15
mveRichard MacCutchan1-Jun-20 4:15 
GeneralRe: Strings in C | The program gives wrong output on string composed of both Upper case and lower case (Logic : ASCII Comparision) Why? Pin
k50541-Jun-20 5:22
mvek50541-Jun-20 5:22 
GeneralRe: Strings in C | The program gives wrong output on string composed of both Upper case and lower case (Logic : ASCII Comparision) Why? Pin
Richard MacCutchan1-Jun-20 6:05
mveRichard MacCutchan1-Jun-20 6:05 
GeneralRe: Strings in C | The program gives wrong output on string composed of both Upper case and lower case (Logic : ASCII Comparision) Why? Pin
kalberts1-Jun-20 8:25
kalberts1-Jun-20 8:25 
GeneralRe: Strings in C | The program gives wrong output on string composed of both Upper case and lower case (Logic : ASCII Comparision) Why? Pin
Richard MacCutchan1-Jun-20 10:28
mveRichard MacCutchan1-Jun-20 10:28 
QuestionRun executable with arguments Pin
Erich Ruth3-May-20 4:04
Erich Ruth3-May-20 4:04 
AnswerRe: Run executable with arguments Pin
Richard MacCutchan3-May-20 4:14
mveRichard MacCutchan3-May-20 4:14 
AnswerRe: Run executable with arguments Pin
Victor Nijegorodov3-May-20 5:50
Victor Nijegorodov3-May-20 5:50 
QuestionVisual C++/CLI Pin
F_Square3-Apr-20 16:26
F_Square3-Apr-20 16:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.