General C++ Programming - February 2017 (Page 13)

by Yany
Querying the value of a variable in SQL Server from C ++ (MFC)
 
Hi, I have an issue in C++ (MFC) with SQL Server that doesn't work. When I query this: (SQL) select int_field from my_table With this code: < ...
[2 replies] Last: Thank you SIK. Yes, I just tried with stored procedure... create pro... (by Yany)
by kndtv
Help With Functions and Rand
 
Instructions: Write a function that returns sum of two dice rolls. A dice roll is a random number between 1 and 6. Demonstrate your function be calling it 5 ...
[4 replies] Last: Line 15: You are seeding the random number generator AFTER you doing ... (by AbstractionAnon)
Format Setting for Dates
 
Good afternoon, i was wondering if anyone can assist me with this problem i am having. I am required to create a member function called void Date::Print() that ...
[5 replies] Last: A small point, make month = "ZERO" or something and do away with su... (by SIK)
Expression must have a constant value
 
Hi, I don´t know why when I try to build this code with Visual Studio it returns an error, but if I do it with Code Blocks it runs perfect . Im using Visual...
[3 replies] Last: Thanks so much for your answers. As you have said its VLA and Visual C... (by BrianStark)
Getting errors and can't figure out why. PLZ HELP
 
My program is supposed to read input from a txt file, process it, do some calculations, and output to a txt file. This is what I have: #include "resistor...
[2 replies] Last: got it! thanks for the help (by glennyballs)
by WAKS
Multiply matrix with itself n times
 
Hi! I'm working on a school assignment where I need to multiply a matrix with itself n times to find the least number of throws needed to finish a snakes and ...
[7 replies] Last: First of all, thanks for all the help. You all where right about the t... (by WAKS)
error in reading data file
 
#include<fstream.h> #include<string.h> #include<conio.h> class record { char title ,author ,member ; int status; public: int code; record() { ...
[2 replies] Last: i figured it out. added stdlib.h and used system("PAUSE"). i wasted 3... (by hugeassnoob)
by DTM256
Defining Class Functions for later
 
Hey guys, I'm curious if there is a way to define a function name, but not it's function. As in: class WindowPane { private: int ax,ay,w,h; ...
[8 replies] Last: Each feature I write these days, I want to push myself to use somethin... (by DTM256)
C++ Countdown and Count-up Loop
 
Hello, I am new to C++ programming, and I am trying to create a program that counts up, and then counts down like this: 70,80,90,100,90,80,70 I want to make...
[2 replies] Last: U can use the code as follows: #include <iostream> int main(int argc... (by Tupelo Shen)
Pointers and Functions
 
Because this is a school assignment i left out the rest of the code. I don't want to accused of copying this code...which would still be mine. Anyways i le...
[1 reply] : The arguments of getData() are type pointer to int, pointer to int and... (by gunnerfunner)
Inputting string&int from file
 
Hello everybody, I am trying to do an assignment for class and the first thing I need to do is read some data from a file. The data is in the following format ...
[6 replies] Last: Thanks everyone! Your suggestions really helped!! (by aashish1996)
Basic Programming
 
Metro City Planners proposes that a community conserve its water supply by replacing all the community's toilets with low-flush models that use only 2 liters pe...
[1 reply] : Do you have any code written? (by Hengry)
OpenMP - parallel without "for"?
 
Hi, I'm really new to parallel processing and my assignment requires that we implement our program in openmp without #pragma omp parallel for... can anyone dire...
[1 reply] : I have no idea, but I see no for here: http://stackoverflow.com/ques... (by keskiverto)
Modiefied Recursive Fibonacci Sequence
 
I am having trouble figuring out exactly how to code this modified Fibonacci sequence. I'm trying to practice using recursion even though it's probably not the ...
[1 reply] : if (n == -1) { total+=1; return 1; } else if (n == 0) { tot... (by jonnin)
by bpugh3
Hangman Game Letter Track
 
I am done with my hangman game the only think I would like to do now is show the missed letters on the screen. I assume I would use an array for this. I'm stuck...
[1 reply] : make an array of bools, 1 for each character allowed in your game. Set... (by jonnin)
The number of digits after the dot in a double number
 
Hi all, consider we have numbers all less than 1 like, 0.2 , 0.254 , 0.36847 , 0.12 and so on and we want to count the number of the digits after the "d...
[3 replies] Last: Not sure how correct/portable this code is but it seems to work on cpp... (by integralfx)
by esolve
what does template <> mean?
 
I come across the following code, and I'm at a loss what they are template <> struct default_converter<luabindx::lightuserdata_t> : native_conver...
[3 replies] Last: That's an explicit specialization of the class template default_conver... (by Cubbi)
Ignore
 
#include "stm32f7xx.h" #include "stm32746g_discovery.h" static void SystemClock_Config(void); static void CPU_CACHE_Enable(void); static void LED_SETUP...
[1 reply] : Quit using this site as a code dump. (by helios)
Creating Matlab Structure in C++
 
Hi, I have used MATLAB to simulate Wireless Sensor Networks (WSNs) for a long time, but since it is too slow, I plan to simulate them using C++. In this rega...
[6 replies] Last: Hey Jack... I have a library that lets you convert M files to cpp file... (by jonnin)
How to fix this "signed/unsigned mismatch "
 
#include <iostream> #include <vector> #include <string> using namespace std; struct lead { string name; bool active; int budget = 0; }; lead ...
[4 replies] Last: Here's the definition of std::size_t from section 18.2 of the draft ... (by dhayden)
February 2017 Pages: 1... 111213141516
  Archived months: [jan2017] [mar2017]

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