General C++ Programming - October 2012 (Page 15)

timestamp v/s clock_t
 
Hi, I am trying to note the time it takes for a function to perform a certain job. I noticed that the results I get using timestamp and clock_t are diff. I ...
[3 replies] Last: errr, i just noticed that timestamp that im using, is not a standard C... (by bhatiaharsh)
static members
 
Class a Class b When i use a as a.static member of b i cannot access any of the method of class.a. Within b Unresolved external
[7 replies] Last: Yes, it will be changed. (by vlad from moscow)
How do you read multiple inputs from a text file?
 
For my program i need to read three different things per line, the format of the .txt file is: Fe B 2 O Xe 0 Al Ca 3 I need to read the three values from ...
[3 replies] Last: #include <fstream> //... std::ifstream i("myfile.txt"); std::string ... (by closed account 10oTURfi)
by Kart
Unexpected Ofstream file output
 
#include<iostream> #include<fstream> using namespace std; int main() { short ItemNo; short Px; char YourName ; ofstream * FileTo; FileTo = new ofstream(); ...
[4 replies] Last: Please ignore as I may have now resolved the problem.... Cheers cheer... (by Kart)
Clicking a link
 
Would it be possible to create a program that clicks a link on a webpage? What information from the webpage source code would I need to make this happen? Should...
[1 reply] : Well, you could. But there are easier ways to do that. (by pogrady)
Lambda vs inheritance/virtual methods for events
 
Hey everyone, I was wondering what your thoughts are no using lambda function vs inheriting and implementing virtual methods. Lambda seems a bit messy.. b...
[4 replies] Last: Yeah, I ended up using virtual methods due to readability and neat cod... (by strongdrink)
by veeyik
What does 'unspecified' in this question means?
 
http://imageshack.us/a/img145/9519/question74.jpg The "unspecified" in the question means that i can put any numbers i want in the const int NUM_SCORE? or i...
[4 replies] Last: oh okay i miss that part. sorry.. =) (by veeyik)
slide tile help please
 
hi
[4 replies] Last: For hysterical raisins, the OP: i need to convert this program into ... (by Moschops)
by Ali93
Need help in "Linked list"
 
Hi I don't know what's wrong with my code my program is about linked list that take a string type and integer. I insert some of names and numbers then i ...
[1 reply] : I don't see what keeping two lists (pass/fail) will buy you other than... (by cire)
by ekorad
Splitting a string
 
Hello again everyone! I have another question: is there any way to split a string? string = "C:\\Program Files\\Projects\\C++\\Folder\\" I want to know...
[7 replies] Last: Thank you very much, I should have spent more time inspecting this cod... (by ekorad)
by glsmn
run a C++ sever program from my website
 
I am writing a registration module for my desktop software (programming with C++ Builder). I have created client and server applications that work great on my l...
[6 replies] Last: there is a free but a alright hosting called 000hosting (by closed account ozUkoG1T)
by shafh
Vector problem
 
Hey everyone. I am for the first time trying to use Vector (I assume thats the prefered dynamic array in c++). I have done the following in my header file: ...
[11 replies] Last: It's not legal C++, but some compilers allow it as an extension. (by cire)
Take a look please
 
#include <iostream> #include <cstdlib> #include <stdlib.h> #include <time.h> using namespace std; const int MLS = 50; const int SENTINEL = -1;...
[2 replies] Last: I put every thing but I have nothing on the screen to be displayed (by ahmedlab7)
random function c++
 
i am trying to print two programs the first is to print a random 3 digit positive value i have this so far int r = rand(); if ( r >= 100 && r<= 9...
[3 replies] Last: Thank you guys i got it to work! @dangerous I used your code for the e... (by chiquitina21)
Still continues
 
#include <iostream> #include <string> using namespace std; int main() { setlocale(LC_ALL, ""); int avstand; string forhallande; cout << "Är du ...
[2 replies] Last: I see you're trying to account for all possible combinations of upper-... (by Gaminic)
strongly typed enums
 
Can strongly typed enums underlying type be floating point? enum class foo : float { value = 3.0f }; int main () { std::cout << foo::value << std::endl;...
[4 replies] Last: Thanks. (by morando)
maximum length of a statement
 
Hi. Is there anything like the maximum length of a statement in C?
[11 replies] Last: From the C Standard 5.2.4.1 Translation limits 1 The implementation ... (by vlad from moscow)
trying to install sdl_image into code blocks...it cant find lSDL_image, i got all the addresses right
 
i put SDL_image.lib but i get the error undefined reference to IMG_load oh wait i forgot to say where it was :/
[no replies]
by Yezman
C++ c-style strings. Repeat_char function
 
So, I have been looking over this function and I am not really sure how i would actually write it out. I have the plan, just need the syntax. bool repeat...
[6 replies] Last: bool repeat_char(const char* s, size_t n) { const char* p = s + ... (by dangerous)
--prefix = PREFIX (meaning ?)
 
In a makefile language, what does --prefix=PREFIX mean? What is --prefix and what is PREFIX ?
[2 replies] Last: Thanks for that. So you mean PREFIX can be any install location say a... (by dominover)
October 2012 Pages: 1... 1314151617... 50
  Archived months: [sep2012] [nov2012]

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