Beginners - June 2017 (Page 13)

by xxvms
Problem with example from book
 
Hi there I am following fairly old book for my course and I have problem with one of the examples from the book. It does not compile and gives me bunch of er...
[2 replies] Last: Hi JBorges 3 more weeks and I am done with this course :) I was wor... (by xxvms)
Generate Next Number and add to char*
 
Hello! I've tried to create a simple program that would allow me to increment a current integer and replace the last "n characters" in a char*. However, n...
[1 reply] : It looks like I have set "_itoa_s" to check the counter (which gets se... (by Armannn)
Usa boy need help
 
The swapThree () function swaps three integers a, b, c to b, c, a. Immediately after calling this function, variable a has the value of variable b, b has the va...
[10 replies] Last: number 2 #include <iostream>// #include <cmath>// using namespace st... (by quangminh98)
Gịgj
 
Kdjd
[1 reply] : #include <iostream> #include <string> using namespace std; //Viet... (by tanhhn58)
Fjf
 
Bla bla
[13 replies] Last: #include <iostream> #include <string> using namespace std; struct ... (by tanhhn58)
Interpreting elements in the parentheses following a vector declaration
 
Hi, I have come across the following code while trying to understand a program: vector<double> P(ny*ny, 0.0); Based on what I have read in a tut...
[11 replies] Last: Using the constructor (parentheses) creates a vector with ny * ny (25... (by lifeisgood)
String
 
no comment #include<iostream> #include<vector> #include<cstring> using namespace std; vector<string> tachtu(string sent){ vector<string> wo...
[2 replies] Last: Standard library is there to be taken advantage of: #include <iostrea... (by Enoizat)
Recursive Knight's Tour Not Passing Copies of Array
 
Hi, I'm supposed to write an algorithm to go through each possible solution (bruteforcing) and find every true solution to a Knight's Tour (5x5, starting at 3,3...
[5 replies] Last: memory may be reused. you've got a dfs algorithm, new boards are creat... (by ne555)
by Starke
mash of dots in rhombus shape
 
I really need help. I menaged to create mash of dots with two FOR loops. Dots are in positions (-5,-5), (-5,-3),(-5,-1),(-5,1),(-5,3),(-5,5) etc untill (5,3),(5...
[1 reply] : One way to do it is to make the square that is the smallest square tha... (by jonnin)
tell me
 
tell you what?
[2 replies] Last: I've just realized this post is nearly identical to another one opened... (by Enoizat)
link list?
 
pls explane me #include <iostream> using namespace std; struct Node{ int data; Node *pNext; }; struct List{ Node *pHead; Nod...
[no replies]
Wondering if I can use memeber functions without object calling it.
 
hi, Quick question is it possible to active a member function without referring to a object. Instead, I want to refer to the object via a reference parameter to...
[9 replies] Last: No friendship nor membership is required in your code: int main() { ... (by keskiverto)
by Suri96
Problem using composition.
 
The following program shows no output nor it shows any kind of error while compiling. Help me find a solution to it. #include <iostream> #include <string> ...
[2 replies] Last: thanks a lot. it completely went out of my mind. (by Suri96)
by Chamat
creating multiple objects based on input
 
I'm reading data from a file that instructs how many objects of a class I need to create. What I attempted to do is create a dynamic array of objects but the i...
[2 replies] Last: The variable machineA stores the address of the memory you've alloca... (by MikeyBoy)
by miror
lvalue required as left operand of assignment error
 
hello! im trying to change a fields in my class through a function and im getting an error. here is a simple example of what im trying to do: class A{...
[2 replies] Last: I know your code was only a simplified example, but it was a wrong exa... (by Enoizat)
C++ * operator in pointer
 
Write your question here. int* x = (int*)0x00509B74; cout << *x << endl; When i run this code and tried to see the value that is *x. It makes Error. j...
[2 replies] Last: Thank you. (by benq1234)
A few questions
 
Hi, I am begginner. I am learning for the exam and i have a few questions. So 1.How many times will the function f in the program fragment be executed? ...
[5 replies] Last: 2) don't think so ... if 9 > 5 add 1, 10 isn't less than 10, it stops.... (by jonnin)
by NSmith
Completely new and Struggling
 
I am completely new to C++. I have done some visual Basic coding before but nothing else. I am trying to write a program that uses pointers, arrays and strings....
[2 replies] Last: > I am completely lost on the whole pointers and strings things. I hav... (by Michael5)
Write then read text file
 
Good evening, I realise there's the fstream option, but it doesn't seem to be working in this instance so would like some help. How does one go about havi...
[10 replies] Last: Thanks everyone for your help! (by Airynoob72)
running on another computer
 
I created a very simple .exe application in Visual Studio 2017. However, it only runs on computers the have Visual Studio installed. Otherwise, it returns an er...
[2 replies] Last: thanks that was the answer! (by Zackfriedman)
June 2017 Pages: 1... 111213141516
  Archived months: [may2017] [jul2017]

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