General C++ Programming - March 2015 (Page 4)

by R23MJ
How to start console app in current console app
I have a Console Application and I was wondering if there is a way to start a different Console App, but I need to do it with the same effect MS-DOS has when yo...
Mar 28, 2015 at 11:18am
[1 reply] : Maybe this> http://stackoverflow.com/questions/14327981/run-c-sharp-co... (by iQChange)
by yj1214
const object or object const?
Foo const *foo1; The object that is pointing to is going to be constant, right? Foo *const foo2; The pointer 'foo2' is going to be constant and...
Mar 28, 2015 at 11:08am
[3 replies] Last: The "read backwards rule" is a useful way to remember this. Read the ... (by Disch)
Array of Class Objects Errors.
I'm getting some errors in my code for an array of class object, but I'm not sure why. Everything works with 5 elements, but when I try to add more I get up to ...
Mar 28, 2015 at 7:16am
[5 replies] Last: I use Microsoft Visual C++ 2010. At least that's what we use for my co... (by RelentlessChaos)
[SOLVED] LNK2019 unresolved external symbol
I've searched the forms for common causes of this problem, but have not been able to find any misspelled calls. 1>Lab05a.obj : error LNK2019: unresolved ext...
Mar 28, 2015 at 3:12am
[2 replies] Last: Issue seems to be having public: Animals(); in Animals.h After ... (by gunman353)
Bool function??
Here is my homework.. I'm little bit confused about the range Write a function bool isprime (int n) which returns true if the passed parameter n is prime. ...
Mar 28, 2015 at 2:42am
[2 replies] Last: In your isprime function, you never return false. If it iterates past ... (by Ganado)
Fill array using function. Error: assignment of read only location
i am trying to populate a presorted array (sorted while as it is being populated). I get the error below. referrring to lines 63 and 66 In function ‘int make...
Mar 28, 2015 at 1:55am
[1 reply] : arr is const, this makes it non-modifiable. change int makeSortArray... (by R23MJ)
Learning C++ and constructing a GUI.
Hey guys, I'm a CS student at a community college and I was wondering, when do schools (if they do, maybe at the university?) teach C++ programming and using it...
Mar 28, 2015 at 1:49am
[1 reply] : Unless you use a library, for the most part programming a UI would be ... (by R23MJ)
question about the CRITICAL_SECTION
when I define :CRITICAL_SECTION cs; EnterCriticalSection(&cs); //processing………………………… LeaveCriticalSection(&cs); The values of cs ...
Mar 28, 2015 at 1:19am
[no replies]
Help Me , I need to learn this and I have to pass PLEASE :'(
#include<iostream> using namespace std; int main() { int SIZE = 5; float COFFEEPRICE = 2.00; int products ="Whipped cream", "Cinnamon", "Choco...
Mar 28, 2015 at 12:49am
[10 replies] Last: Ok, I will :) Ps. I know that Im wrong what I did there, im too lazy t... (by vokzkriyel)
multiple definitions error.
I'm trying to compile a project in Unix but keep getting the following errors. I have tried compiling in visual studio but am not seeing the same thing.. any ad...
Mar 27, 2015 at 11:53pm
[4 replies] Last: > Make sure any functions in xran.h have the whole function. ¿ah? ¿w... (by ne555)
need help with C++
need coding for a program that allows user to enter numbers and then display greatest and lowest value (c++)
Mar 27, 2015 at 10:58pm
[6 replies] Last: No, it's not. The >> function reads ints from the stream cin until the... (by Faison)
by anup30
Challenge: faster 3n+1 solution
Make your code as fast as possible: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=36 The Proble...
Mar 27, 2015 at 9:44pm
[15 replies] Last: 36 millisecond // UVa online judge, problem 100, The 3n + 1 problem ... (by anup30)
Problems with Connect Four.
Hi to everyone. I'm writing a connect four game by alpha-beta pruning (modified minimax) algorithm. But it does not work correctly. Throught 3-4 steps AI gets a...
Mar 27, 2015 at 8:16pm
[1 reply] : Please edit your code to be in code tags (by Mats)
Theoretical Question
Could you, theoretically, create a program that writes another program and compiles and executes that other program, which subsequently does the same? If the...
Mar 27, 2015 at 5:45pm
[4 replies] Last: METAPROGRAMMING! Thank you. (by Aaron Vienneau)
Dynamically allocating a struct that's inside of another struct??
This is what I'm trying to do: there are many grades in a school, and each one has many students. I don't want to hard-code the amount of grades in the school (...
Mar 27, 2015 at 5:17pm
[5 replies] Last: Thanks! understood now. (by alexei123)
How to make c++ choose a random string
How do I make it so my program chooses a random pre-made string? or a random number or a random number + string? thanks a billion.
Mar 27, 2015 at 3:19pm
[1 reply] : Create 2 strings. use this - to insert a random number between 1 and ... (by TarikNeaj)
How can i make my timer run while I can input? Help please.
Like if I hit Escape button from my keyboard, the loop will stop? #include <iostream> #include <conio.h> #include <string.h> #include <windows.h> #include <st...
Mar 27, 2015 at 1:27pm
[3 replies] Last: Yeah it's working but you need some ... libraries and flags If you are... (by Gamer2015)
Need to declare a class ( defined in cpp file ) as friend
Hello, I have a namespace and class defined inside a cpp file (say x.cpp ). I want to declare this class as 'friend' inside another header (say y.h), but the...
Mar 27, 2015 at 1:04pm
[5 replies] Last: [quote=rajcrec]Now I want a function within C as a friend function for... (by Peter87)
heapInsert Array Corruption error?
I am trying to insert a number into a built heap using an array. However when i add a number and rebuild the array then print i receive a - "Stack around the va...
Mar 27, 2015 at 12:39pm
[3 replies] Last: As far as I know you can't just "extend" an array by writing past its ... (by Horscht)
Text Alignment Using Setw()
Hi, I'm trying to align text on the console and I'm having trouble getting everything aligned to where it should be. I have a program right now that's using a...
Mar 27, 2015 at 12:08pm
[2 replies] Last: Thank you! That was helpful and helped me better understand the use of... (by RelentlessChaos)
March 2015 Pages: 123456... 28
  Archived months: [feb2015] [apr2015]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.