General C++ Programming - October 2015 (Page 3)

by Dkob1
Int Array (Basic)
 
Define an int array variable named arx with 3 slots, and stuff a 7 in the last slot int arx =7; Is this correct?
[3 replies] Last: Did you define this variable as: int arx ; initially? That means tha... (by alex067)
Need Help
 
How would i get this so i could click anywhere within the grid with this functions? void CGrid::cellHit(int x, int y, int &row, int &col) { //fix it ...
[4 replies] Last: hmmm (by closed account Doj23TCk)
C++ and Java. The king programming languages.
 
Dear Community, I know C++ and Java are the king programming languages. - Java allows enterprise server applications, plus mobile development with android....
[10 replies] Last: that post should be in the lounge forum instead. however programming ... (by Ericool)
Specific number of records from a file. due at midnight please help...
 
Hello, I have a hw assignment due at midnight. I need help I have two problems and I am stuck on the first one. this is the first problem. . Write a main meth...
[2 replies] Last: Thank you very much that was extremely helpful :) (by RedSox123)
megesort()
 
Hi What's wrong? void fnMerge(long a , int low, int high, int mid); void msort(long int a , int m, int n){ if( (n-m)==1) return; else{ mso...
[8 replies] Last: Taking another look at your code, I notice that you are allocating a f... (by Duthomhas)
implementing mergesort()
 
Hi. What's wrong with my implementation? My program just flashes............
[2 replies] Last: http://www.cplusplus.com/forum/general/177367/ (by closed account 48T7M4Gy)
Create a deck of cards
 
Hey so I need a little help. I am currently working on a program. I need to make a couple of functions. One will initialize the deck back to its in order state ...
[3 replies] Last: Well the deck can be randomised in many ways. One way would be by sele... (by closed account 48T7M4Gy)
Declaring size of array in constructor
 
Hello, I'm currently implementing class using C++ string. Now, as private members of this class I have: class MyClass { private: string key ; ...
[1 reply] : class MyClass { private: string *key; string *val; publi... (by coder777)
editing a .txt file
 
Hi, I am trying to edit a text file through c++ and this is what I tried but don't know why its not working here's my class class A{ public: int a; char b ; ...
[8 replies] Last: Thanks... (by shadder)
by bonho
read/write in std::map
 
Hi, I have one thread that would very frequently insert into std::map (but never erase) and another thread that iterates and reads from the map. Would that ...
[2 replies] Last: No standard container is thread safe. You cannot do this without mutex... (by coder777)
by Ozzy69
Help with buffer in c++
 
Hi, appear that be with problem of buffer in program in line 99. I tried put a getchar(), but dont gave. I want that appear so: digite os numerurzins ae: 4 5...
[1 reply] : #include <iostream> #include <cstdlib> #include <cmath> //#include <s... (by closed account 48T7M4Gy)
using strtol()
 
Hi. What's wrong pa = a; while(!pa) { nums = strtol(pa, &pa, 10); ++j; }
[4 replies] Last: what should the loop cond. be then? [quote=cppreference]If the str ... (by MiiNiPaa)
how do I byteswap values?
 
Hello, I have my code here and trying to byte swap the value in before_1~4. I also have done to make as hex number as well. All I need to do is swap the befor...
[2 replies] Last: a char has 8 bits, so not the same thing. use reverse iterators (by Ericool)
MySQL (libmysql) Question.
 
I'm using the MySQL Connection library (libmysql.dll) to establish a connection to my SQL server. Everything worked fine until I decided to allow the user to in...
[13 replies] Last: @coder777 I tried that solution and it did nothing for me. (by CGunn86)
Enums and pointers... likelihood of end of space memory
 
I have a situation where I have a "list" class that represents a set of possible values for a custom user control type that goes on a menu. The point is so that...
[5 replies] Last: I'm saying that nothing in the language guarantees two's complement a... (by MiiNiPaa)
User provided function() line 0 in unknown directory unknown file
 
Hello, My code uses PETSC and MPI libraries (linked via third party computational library). It crashes with the error below (I ran it with valgrind to get more...
[1 reply] : I use recursion in my code. could it be the reason? Yes, an infinite ... (by coder777)
Not able to use "graphics.h" in Code Block ?
 
I'm trying to use "graphics.h" just for learning purpose. I'm trying to draw a arc but "Code Block 13.12" gives this error:- "Program has stopped working" ...
[3 replies] Last: gcc -v in command line when in MinGW/bin directory (by MiiNiPaa)
Pointer Problems
 
Hi everyone. I am trying to pass an array by reference to a function where data would get added to it from a predefined list of values. #include <stdio....
[1 reply] : Apparently I overlooked the printing. Should've used people instead... (by jumper007)
project
 
#include <iostream> #include <iomanip> #include <ctime> #include <string> using namespace std; // Function prototypes void BuildDeck( int deck , const int si...
[1 reply] : The immediate problem is could you please put code tags (<> in the for... (by closed account 48T7M4Gy)
by tnt980
Help me get the output
 
In this project you will contemplate the persistence of a positive non-zero integer n. The persistence of n is computed by multiplying all the digits of n by e...
[2 replies] Last: Three goes when only one is necessary http://www.cplusplus.com/forum/... (by closed account 48T7M4Gy)
October 2015 Pages: 12345... 27
  Archived months: [sep2015] [nov2015]

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