General C++ Programming - April 2015 (Page 24)

Having trouble compiling
 
I can't address the problem. I having trouble compiling the coding. Anyone can help me please. Thank you so much #include <iostream> using namespace std; void...
[4 replies] Last: alright dude. I got it. it's working. thank you so much for your help. (by vikramathitan)
Grading Program
 
Hello! I've made a simple program where a user inserts a test grade number and then receives the letter grade for it. Thanks for looking at it, I am open to any...
[11 replies] Last: @TarikNeaj I will be sure to keep that in mind when making my next pr... (by mjamesball9)
what should i do ...
 
this is what i have if i change ch into string give me error that i can't change int to string if i change ch into char i get error on pw..... in main i have p...
[2 replies] Last: so do i get the first letter of the string if I set up like this ? (by jae0014)
Initializing array using default constructor
 
Hey guys I've recently started programming and I'm having trouble with the concept of initializing an array. I'm trying to make a program using only one array...
[5 replies] Last: Alright thanks Neaj it compiles now! But now I have a bug which I do... (by BarelyOtaku)
wc and reading from pipe
 
Hi. I want to give files and get the highest byte from the files. My code is working only for one ile giving the byte but when I give two it gives 1 my files...
[8 replies] Last: didn't cover generic yet :(...but thanks I will keep these examples fo... (by csstudent123)
-ampersand-in-the-return-type-of-a-function
 
how-does-ampersand-in-the-return-type-of-a-function-declaration-work type& foo();
[3 replies] Last: thanks..what syntactical ways I can use this reference? An example wou... (by csstudent123)
I need help on my homework.
 
Write a program to validate a password using the following rules: • The password must be at least six characters in length • It must contain at least one ...
[1 reply] : check out the functions in cstring,cctype,cstdlib and string libraries... (by csstudent123)
by DLCom
Random number generation does not work although srand is initialized correctly
 
Hey there, yesterday I wrote this simple program: #include <math.h> #include <string> #include <conio.h> #include <cstdlib> #include <ctime> using n...
[4 replies] Last: Yep. Thanks ^^ (by DLCom)
selection sort
 
So for the sake of practice I decided to code selection sort from memory and I came up with this. Am I doing this right? It works but I'm not sure if it works c...
[5 replies] Last: Thanks for the responses I agree now that I look at it. (by cppnoob25)
Why am I getting linker errors when I split my program into separate files?
 
The error I'm getting: LNK2001: ' unresolved external symbol "public: __cdecl Object::Object(void)" (??0Object@@QEAA@XZ) //Object.h #ifndef OBJECT_H #define ...
[3 replies] Last: If you google unresolved external symbol c++ you might find out :p... (by TarikNeaj)
Constructor destructor invocation:-
 
What will be the order of constructor and destructor invocation in the following piece of code : class A {…}; class B {….}; Class C { B b; ...
[1 reply] : http://www.gotw.ca/gotw/080.htm Destruction is reverse. (by keskiverto)
C++ replacing part of string with a variable double
 
this program uses the string prompt and replaces "{0}" with 5.651 and "{1}" with 3.427 and it works fine. when i change the string to "{0:c}" and "{1:c}" to rep...
[1 reply] : hello? can anyone give me a hand? (by johnd55)
by c00012
My code doesn't working....
 
Hello Guys, I wrote following code to read data from text file into vector using structure. #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include...
[1 reply] : ¡look, indentation! #define _CRT_SECURE_NO_WARNINGS #include <iostre... (by ne555)
by davidm
my continue isnt working
 
void countletters(char*s) { int cword=0; int size=strlen(s)+2; for(int i=0;i<=size;i++) { cword++; if((int)s ==32||(int)s ==0) { cout<<...
[11 replies] Last: What do you want to know? Or does it work just fine? (by Gamer2015)
What's the effect of the VGA Byte/word/doubleword modes?
 
It seems that there's two byte/word/doubleword settings: - The CRTC Mode Control's byte/word mode and Underline Location's Doubleword setting combine into by...
[3 replies] Last: This is my current VGA rendering plane loader: void VGA_loadcharacter... (by superfury)
How to fix error: C3867?
 
hey...i have written some codes and when i debug, this error showed up, what do i have to do? me codes: int main() { char read ; int a = { 0 }, b = { 0 },...
[2 replies] Last: tnx a lot (by HMD7313)
How to store by value instead of reference
 
Right now I am reading a XML file into a char pointer array, and storing the value in that array into a stack. I'm reading every line into the same char pointer...
[5 replies] Last: A std::stack<char*> ? Could you use std::stack<std::string> instead... (by keskiverto)
std::function vs functions pointer.
 
I'm storing a short function for later use. I'm curious, can I except better performance from a lambda with a std::function or a c function with a raw pointer?
[8 replies] Last: > So do you suspect the compiler is optimizing out the call? The comp... (by JLBorges)
by OMG1
array problem
 
Duplicate Elimination with array) Use a one-dimensional array to solve the following problem. Read in 20 numbers, each of which is between 10 and 100, inclusiv...
[9 replies] Last: Sorry man, doesn't work, counter will go forever (by OMG1)
bigint multiplication
 
Here I've got a sad multiplication function that is part of a large bigint calculator class. the arr is a pointer to a resizable array class(get and set are mem...
[17 replies] Last: I added that range check: if(size - shift - (i - size-1) >= 0) te... (by Gamer2015)
April 2015 Pages: 1... 2223242526... 28
  Archived months: [mar2015] [may2015]

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