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...
[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...
[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 ...
[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...
[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. ...
[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...
[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...
[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 ...
[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...
[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...
[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++)
[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...
[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...
[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...
[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 (...
[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.
[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...
[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...
[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...
[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...
[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.