General C++ Programming - November 2013 (Page 33)

Qt creator operator[]
 
This is trying my patience... Compiler Error: error: passing 'const task_list_class' as 'this' argument of 'task_object& task_list_class::operator (const un...
[7 replies] Last: oh... I feel like a moron for missing that. I'm so sorry, I've been ... (by IWishIKnew)
Attempting to modify this function to read from a (;) semi-colon-separated file
 
I have a function reads from a file like this file foo;bar foo;bar foo;bar function void EntryList::loadfile(const char filefoo ) { if...
[2 replies] Last: It is because you should not loop on EOF. That is a bad practice. Co... (by Duthomhas)
by djf
Letter frequency for a vector
 
I am trying to print out the letter frequency of a vector that the user inputs and what number that letter is in the ASCII. I am supposed to say, for example: "...
[1 reply] : So far I have this. (I don't know how to make it colored and easy to r... (by djf)
QT Creator: Calling child Windows
 
All of it is self explanitory, but I really don't have the time to analyze hours' worth of code... Can anyone tell me how to call a window? I made my main...
[1 reply] : nevermind, I just added a member that's a pointer to what I want modif... (by IWishIKnew)
about objects and functions
 
i'm trying do 1 thing, but i'm 'stuck' :( i try the functions pointers too, but without sucess :( i understand the objects are the way for work with class's...
[2 replies] Last: sorry what i need is object polymorphism (by Cambalinho)
by JAAFAR
error C4430: missing type specifier - int assumed
 
This is a simple dll project "square" from which I want to export the square function and use it in excel Funct.cpp double _stdcall square(double & x) { r...
[5 replies] Last: You don't need a .def file, but if you don't you need to export the fu... (by kbw)
i need c++ code for this algorithm thanks :)
 
function divide(x;y) Input: Two n-bit integers x and y, where y>=1 Output: The quotient and remainder of x divided by y if x=0: return (q,r)=(0,0) (q,r)=di...
[3 replies] Last: ?? (by esamnaser123)
standard type conversions
 
I read the following: "C++ introduces a new casting operator called static_cast. A static cast works similarly to the C style cast, except it will only do st...
[2 replies] Last: Safety. static_cast for instance does compile-time checks to make sure... (by Albatross)
trouble reading from a text file
 
hello everyone I tried to read in a file that contain studentId(8 integer long) and GPA in the same line separated by a comma, but I couldn't. Any help is app...
[3 replies] Last: hi, I tried your code and it seems like it only read one top of the li... (by rookie123)
by pinvpn
Unable to open the .dat file
 
Need help in reading a .dat file, i'm unable to open the file This program is for a Air Quality index detector, the AQI machine records the particle concentra...
[5 replies] Last: What does the horny laptop say to the sexy desktop? .dat file (by JasperBraun)
Looping, Kind Of...
 
Hello. I need to have a program display an error message if the variable entered isn't an integer but then I want it to cin again. I have this but it doesn't wo...
[8 replies] Last: Thank you very much long double main and xismn. NOw I understand. Than... (by JasperBraun)
problem
 
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { int i=10; float a , n; do (a )=(float)i-(1/a[i+2]); n=a ; ...
[4 replies] Last: #include <cstdio> #include <cstdlib> #include <cmath> int main() { ... (by stifmaster038)
having trouble read from a file
 
hello everyone I tried to read in a file that contain studentId(8 integer long) and GPA in the same line separated by a comma and white space, but I couldn't. ...
[no replies]
Problem in an array of char - shows more than it should
 
Hello guys :) I am 17 years old and I am training for the olympiad. Amd while I was testing some codes, I came to this problem. I have this code: #include <...
[1 reply] : http://www.cplusplus.com/faq/sequences/strings/c-strings-and-pointers/... (by Duthomhas)
expected '(' to follow 'inline'
 
hi, while compiling c++ code its coming errors like error C2054: expected '(' to follow 'inline' error C2143: syntax error : missing ')' before '*' erro...
[6 replies] Last: The comma should not (IIRC) be an error, but attempting to use designa... (by Duthomhas)
Help with Random Number Selector.
 
Hello, I need to get player two to become like an AI and randomly pick the number. I have been having difficulty with this, please help me!! // Tic Tac Toe...
[10 replies] Last: Thank you, thank you, thank you! I am so happy right now!!! (by KeegM480)
Template Inheritance
 
Hello every one... i am new to C++ programming. and i want very simple program with step by step description about Template Inheritance. Please any one can tell...
[no replies]
Having trouble with ifstream and getline... :\
 
Ok, so the problem is that I use getline(my_ifstream,my_string,my_char); and after that is done, my_string is empty. I really don't get it, and I will post ...
[7 replies] Last: Computerquip, I have no positive cases, and I only have one text docu... (by Superdude)
Dont understand
 
Write a program that prompts the user to enter an integer and then displays that integer as a product of its primes and if it is a prime then it should say so??...
[7 replies] Last: I have now changed my code to this, #include <iostream> using namespa... (by Needhelp7589)
about functions pointers
 
i'm build 1 class that let me do a function and change it too: class event { private: void (*foo)(...); public: event(void (*foo1)(...)) { ...
[no replies]
November 2013 Pages: 1... 3132333435... 46
  Archived months: [oct2013] [dec2013]

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